NDepend Blog

Improve your .NET code quality with NDepend

Understand NuGet Central Package Management and Transitive Pinning with Examples

January 16, 2025 4 minutes read Nowadays, .NET  applications often rely on numerous NuGet packages, each of which may depend on additional packages. As a result, it’s common for multiple...
NDepend January 16, 2025

.NET – 7 Decompiler Compared (2025)

January 10, 2025 9 minutes read Looking to reverse engineer or disassemble some .NET code? Then learning how to decompile .NET assemblies is an essential skill for any .NET developer...
NDepend January 10, 2025

C# Array and List Fastest Loop in 2025

January 9, 2025 5 minutes read Discussions about the fastest way to loop through an array (T[]) and a List<T> in C# have been ongoing. Results can vary with each...
NDepend January 9, 2025

Visual Studio vs Visual Studio Code: The Ultimate Guide (2025)

January 8, 2025 8 minutes read In the world of .NET development, two popular tools stand out: Visual Studio and Visual Studio Code. Visual Studio is generally recognized as a...
NDepend January 8, 2025

WPF vs WinForms – Making the Right Decision in 2025

January 7, 2025 7 minutes read If you’re a developer faced with the decision of selecting between Windows Presentation Foundation (WPF) and Windows Forms (WinForms) commonly referred to as WPF...
NDepend January 7, 2025

The attribute OverloadResolutionPriority in .NET 9 and C# 13

December 12, 2024 2 minutes read With .NET 9, we gain a new tool for managing method overloads: OverloadResolutionPriorityAttribute declared in the namespace System.Runtime.CompilerServices. It lets you set an overload’s...
NDepend December 12, 2024

C# Async/Await Explained: Complete Guide with Examples [2025]

December 2, 2024 9 minutes read If your application involves I/O-bound operations like network requests, database access, or file system reads and writes, asynchronous programming is essential. Similarly, for CPU-bound...
NDepend December 2, 2024

.NET 9.0 LINQ Performance Improvements

November 19, 2024 5 minutes read NET 9.0 brings significant improvements to LINQ performance, with some scenarios showing remarkable gains. Let’s take a closer look at what’s driving these enhancements....
NDepend November 19, 2024

Alternate Lookup for Dictionary and HashSet in .NET 9

November 18, 2024 3 minutes read In .NET 9, a new method called GetAlternateLookup<TKey, TValue, TAlternate>() has been introduced for hash tables classes, including Dictionary<TKey, TValue>, HashSet<T>, ConcurrentDictionary<TKey, TValue>, FrozenDictionary<TKey,...
NDepend November 18, 2024

The Issue with using the Cobertura Code Coverage Format in .NET

November 14, 2024 1 minutes read Since December 2023, Microsoft has added support to Microsoft.CodeCoverage and dotnet-coverage for exporting code coverage data in the Cobertura format (see the announcement here). [crayon-67aedf789bd49511166842/] Because...
NDepend November 14, 2024

Why Is Counting Lines of Code (LOC) Useful?

November 7, 2024 2 minutes read In the previous post How do you count your number of Lines Of Code (LOC) ?, we explained how to count the LOC of...
NDepend November 7, 2024

How do you count your number of Lines Of Code (LOC) ?

November 6, 2024 2 minutes read Counting Lines of Code (LOC) is not as straightforward as it seems. Developers often wonder: Should method signature declarations count? What about lines with...
NDepend November 6, 2024

The problem with frameworks

October 31, 2024 3 minutes read I just watched this short 2:39 video from Uncle Bob, and it rang a bell. His books inspired me two decades ago to create...
NDepend October 31, 2024

Find C# Code Duplicate

October 22, 2024 3 minutes read Duplicate code copy-pasted is problematic. It increases maintenance efforts and the risk of inconsistencies. Changes made in one instance may not be reflected in...
NDepend October 22, 2024

Faster Dictionary in C#

September 2, 2024 5 minutes read In the .NET Base Class Library, Dictionary<TKey, TValue> is an essential key-based hashtable providing constant time access to values. This means accessing dictionary[key] takes...
NDepend September 2, 2024

Fastest C# Enum to String

July 15, 2024 3 minutes read This article benchmarks various ways to obtain a string from an enumeration value in C# .NET, along with other common enumeration APIs. At NDepend,...
NDepend July 15, 2024

C# DateTime Format In A Nutshell

July 11, 2024 6 minutes read This article is about C# DateTime Format, which means both: Obtain a date-formatted string. Use a pattern like "yyyy-MM-dd HH:mm:ss" to extract and format the...
NDepend July 11, 2024

Readonly, Immutable, and Frozen Collections in .NET

July 1, 2024 4 minutes read In modern software development, immutability is a powerful concept. The .NET Base Class Library (BCL) offers readonly, immutable, and frozen collections. This terminology might...
NDepend July 1, 2024

When to create a new .csproj?

June 24, 2024 5 minutes read Recently, a question has been raised on Reddit/r/dotnet: When should you create a new .csproj? This is a crucial consideration for every .NET team....
NDepend June 24, 2024

Top 10 C# Recent Improvements

June 3, 2024 7 minutes read Over the years, in collaboration with the community, the C# team has introduced numerous impressive new syntax features. Some of these simplify coding and...
NDepend June 3, 2024

The .NET Generic Math Library

May 15, 2024 7 minutes read In November 2022 with the release of .NET 7, new math-related generic interfaces have been added to the .NET Base Class Library (BCL). This...
NDepend May 15, 2024

C# static abstract members

May 14, 2024 5 minutes read C# 11 proposed interface members declared as static abstract. This is useful to handle both: Polymorphism at the type level, for example when abstracting...
NDepend May 14, 2024

The .NET 7.0 IParsable<TSelf> interface

May 7, 2024 3 minutes read As I explained in the post C# 11 static abstract members, C# 11 let’s write static abstract members in an interface. This feature was...
NDepend May 7, 2024

C# Discriminated Union: What’s Driving the C# Community’s Inquiries?

May 6, 2024 6 minutes read In recent years, there has been a notable surge in inquiries from the C# community regarding language-level support for C# Discriminated Unions. What individuals...
NDepend May 6, 2024

Covariance and Contravariance in C# Explained

May 2, 2024 6 minutes read Introduction Covariance and contravariance allow more flexibility when dealing with C# class hierarchy. This article explains and demonstrates the concepts of Covariance and Contravariance...
NDepend May 2, 2024

In the Jungle of .NET Obfuscator Tools

April 26, 2024 7 minutes read In this article, I will explain our genuine experience with various .NET Obfuscator Tools. We end up explaining that .NET Reactor is the one...
NDepend April 26, 2024

Vertical Slice Architecture in ASP.NET Core

April 26, 2024 6 minutes read The organization of code in a solution is a subject of frequent debates. Currently, two prominent approaches have garnered attention: Clean Architecture versus Vertical...
NDepend April 26, 2024

C# 12 New Features

April 26, 2024 5 minutes read C# 12 along with .NET 8 has been officially released in November 2023. Let’s explore C# 12 New Features in this post. Primary Constructors...
NDepend April 26, 2024

Improve C# code performance with Span<T>

April 24, 2024 9 minutes read Welcome to our exploration of System.Span<T> and System.ReadOnlySpan<T>, two powerful structures introduced in C# 7.2 back in 2017. As a type-safe way to access...
NDepend April 24, 2024

.NET 8 Top 10 New Features

April 24, 2024 7 minutes read .NET 8 has been officially released in November 2023. You can download it here. Designated as an LTS (Long Term Support) version, it guarantees...
NDepend April 24, 2024