NDepend Blog

Improve your .NET code quality with NDepend

Software Architecture: The 5 Patterns You Need to Know

February 26, 2026 2 minutes read When I was attending night school to become a programmer, I learned several design patterns: singleton, repository, factory, builder, decorator, etc. Design patterns give...
Erik Dietrich February 26, 2026

Developing an MCP Server with C#: A Complete Guide

February 26, 2026 9 minutes read At NDepend, we’ve built an MCP Server in C# and open-sourced it here: https://github.com/ndepend/NDepend.MCP.Server It leverages both the NDepend.API and the ModelContextProtocol NuGet package...
NDepend February 26, 2026

Layered Architecture: Still a Solid Approach

February 7, 2026 1 minutes read Layered architecture gets a lot of flack. Even though it’s still the most prevalent architecture, we view it as an anti-pattern. It’s old, not...
Erik Dietrich February 7, 2026

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

December 30, 2025 8 minutes read Despite their similar name, Visual Studio and Visual Studio Code are two distinct products created by Microsoft. Visual Studio is a full-featured Integrated Development...
NDepend December 30, 2025

WPF vs WinForms – Making the Right Decision in 2026

December 29, 2025 8 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 December 29, 2025

C# Array and List Fastest Loop in 2026

December 27, 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 December 27, 2025

C# 14 Extension Members: Also Known as Extension Everything

November 12, 2025 4 minutes read C# 14 introduces extension members — also known as extension everything. The New C# 14 Extension Method Syntax The example below demonstrates how to...
NDepend November 12, 2025

Modern .NET Reflection with UnsafeAccessor

November 10, 2025 4 minutes read Reflection in .NET has traditionally been powerful but slow. Starting with .NET 8, the [UnsafeAccessor] attribute provides a zero-overhead alternative for accessing private members,...
NDepend November 10, 2025

.NET 10.0 dotnet run app.cs or file-based program

November 10, 2025 5 minutes read This post covers a new .NET 10 feature that lets you build and run a single C# file without creating a .csproj project file....
NDepend November 10, 2025

C# Optional Parameters Explained

October 27, 2025 3 minutes read In C#, optional parameters are not mandatory—they can be omitted at call site. They allow you to skip providing arguments for certain parameters. Thus...
NDepend October 27, 2025

Interesting Facts about Visual Studio 2026 Preview Insider

September 10, 2025 4 minutes read After four years of waiting since Visual Studio 2022, the Visual Studio 2026 Preview Insider is finally here! You can download it today here....
NDepend September 10, 2025

Visual Studio Next Version: What’s Coming and What to Expect

September 1, 2025 6 minutes read In mid-August 2025, Mads Kristensen, lead designer of the C# programming language, discussed with his team The Future of Visual Studio in a YouTube...
NDepend September 1, 2025

.NET Native AOT Explained

August 5, 2025 7 minutes read Within the realm of software development, optimizing performance and streamlining efficiency remain essential. The .NET platform has been innovating for 2 decades to provide...
NDepend August 5, 2025

C# ValueTuple Full Guide

July 28, 2025 9 minutes read C# 7.0 introduced ValueTuple in 2017, making it easier to work with lightweight data structures.Here’s an example using ValueTuple with the () syntax to...
NDepend July 28, 2025

What the Singleton Pattern Costs You

July 17, 2025 2 minutes read Do you use the singleton pattern?  If not, I’m assuming that you either don’t know what it is or that you deliberately avoid it....
Erik Dietrich July 17, 2025

Architecture of a .NET Application: 8 Case Studies

July 10, 2025 8 minutes read This recent question on Reddit’s Number of projects per solution led to interesting debates. The answer depends on the app’s size and domain. In...
NDepend July 10, 2025

Clean Architecture in ASP.NET Core

July 7, 2025 9 minutes read As applications scale, flexibility and maintainability become essential. .NET Core Clean Architecture provides a clear structure with minimal dependencies, making it a popular choice....
NDepend July 7, 2025

Understand Directory.Build.props: Centralizing .NET Project Configurations

July 3, 2025 4 minutes read In the world of .NET development, managing project configurations and properties efficiently can significantly streamline your development process. One powerful but often underappreciated feature...
NDepend July 3, 2025

C# DateTime Format In A Nutshell

June 16, 2025 7 minutes read This article covers C# DateTime Format, addressing both of its main aspects: Obtain a date-formatted string. Use a pattern like "yyyy-MM-dd HH:mm:ss" to extract and...
NDepend June 16, 2025

Vertical Slice Architecture in ASP.NET Core

June 10, 2025 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 June 10, 2025

C# Index and Range Operators Explained

May 24, 2025 3 minutes read In this post, we comprehensively demystify the C# index ^ and range .. operators. The index operator ^ Let’s start with the index ^...
NDepend May 24, 2025

Abstract Class vs Interface in C#

May 21, 2025 7 minutes read In C# object-oriented programming (OOP), understanding the difference between Abstract Class vs Interface is essential for designing flexible and maintainable code. Both abstract classes...
NDepend May 21, 2025

Class vs Struct in C#: Making Informed Choices

May 11, 2025 9 minutes read In C# programming, choosing the right data type between classes and structs is a crucial decision that impacts application performance and design. Choosing Between Struct...
NDepend May 11, 2025

.slnx The New .NET Solution XML File Format

March 17, 2025 3 minutes read On March 13th, 2025 Microsoft officially announced the a new .NET solution file format with file extension .slnx. For example for this simple solution:...
NDepend March 17, 2025

Computing Technical Debt with NDepend

February 16, 2025 2 minutes read For years, I have struggled to articulate technical debt to non-technical stakeholders.  This struggle says something, given that technical debt makes an excellent metaphor...
Erik Dietrich February 16, 2025

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

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# 13 Semi-Auto Properties

December 4, 2024 2 minutes read C# 13 introduced an exciting feature to boost developer productivity and code clarity: semi-auto properties. This new feature solves the trade-off between the ease...
NDepend December 4, 2024

C# 13 params collections

December 3, 2024 3 minutes read Here is a quick post to explain how the upcoming C# 13 params collections feature frees your code from many allocations. C# params prior...
NDepend December 3, 2024

C# 13 ref struct interfaces and the ‘allows ref struct’ generic anti-constraint

December 2, 2024 4 minutes read C# 13 will allow interfaces on ref struct. Until now, without this possibility ref struct missed out on abstraction. For example, while Span<T> acts...
NDepend December 2, 2024