NDepend Blog

Improve your .NET code quality with NDepend

Pointers in C# and Memory Safety: Span vs. C# 16 unsafe

June 7, 2026 9 minutes read For most of its life, C# has kept you away from raw memory. You get garbage collection, bounds-checked arrays, and a type system that...
NDepend June 7, 2026

C# Pattern Matching Explained (2026)

June 6, 2026 9 minutes read Last updated: May 2026. Covers C# 7 through C# 14. C# Pattern Matching lets you test whether an expression has a specific shape (a...
NDepend June 6, 2026

Maintainability Index: A Practical Guide for C# Developers

June 1, 2026 9 minutes read If you have ever opened a code analysis report and seen a score labelled “Maintainability Index” sitting next to one of your classes, you...
NDepend June 1, 2026

Improve C# code performance with Span<T>

June 1, 2026 9 minutes read C# Span<T> and ReadOnlySpan<T>, which C# 7.2 introduced in 2017 and which .NET Core fully supports, are highly efficient structures for working with contiguous...
NDepend June 1, 2026

C# Nullable Types Explained (2026)

June 1, 2026 9 minutes read C# Nullable is two features sharing one name. The older one, nullable value types, has been around since C# 2.0 in 2005 and lets...
NDepend June 1, 2026

Anatomy of an Open-Source AI Coding Agent Built in .NET: CodeAlta

May 31, 2026 9 minutes read A large language model doesn’t perfom any action. It reads text and writes text. That is the whole contract. So how does an “AI...
NDepend May 31, 2026

C# String Interpolation Explained

May 25, 2026 9 minutes read C# string interpolation is the dollar-sign syntax that embeds variables and expressions directly inside a string literal. Introduced in C# 6, it has largely...
NDepend May 25, 2026

.NET – 7 Decompiler Compared (2026)

May 25, 2026 9 minutes read Need to read the C# behind a compiled assembly? A good .NET decompiler turns IL code back into readable C# in seconds, and most...
NDepend May 25, 2026

In the Jungle of .NET Obfuscator Tools

May 25, 2026 9 minutes read In this article, I will share our genuine experience with various .NET Obfuscator tools. In the end, we picked .NET Reactor to obfuscate our...
NDepend May 25, 2026

SOLID Design in C#: The Dependency Inversion Principle (DIP) with Examples

May 25, 2026 9 minutes read The Dependency Inversion Principle (DIP) is one of the five essential SOLID design principles in C# and .NET. These principles are guidelines for the...
NDepend May 25, 2026

SOLID Design in C#: The Interface Segregation Principle (ISP) with Examples

May 25, 2026 9 minutes read The Interface Segregation Principle (ISP) is the “I” in SOLID and one of the five essential SOLID design principles for object-oriented code in C#,...
NDepend May 25, 2026

SOLID Design in C#: The Liskov Substitution Principle (LSP)

May 25, 2026 9 minutes read The Liskov Substitution Principle (LSP) is the third of the five SOLID design principles, and for many C# developers it is also the most...
NDepend May 25, 2026

SOLID Design in C#: The Open-Close Principle (OCP)

May 25, 2026 9 minutes read The Open-Closed Principle (OCP) is the “O” in SOLID, the five object-oriented design principles every C# and .NET developer eventually runs into. In one...
NDepend May 25, 2026

SOLID Design in C#: The Single Responsibility Principle (SRP)

May 25, 2026 9 minutes read The Single Responsibility Principle (SRP) is one of the five essential SOLID design principles that guide object-oriented programming in C# and .NET. It is...
NDepend May 25, 2026

C# 15 Unions

May 25, 2026 9 minutes read A C# union -also called a discriminated union, tagged union or sum type- is a type whose value is exactly one of a fixed,...
NDepend May 25, 2026

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

May 22, 2026 9 minutes read Mastering C# async / await is key to building fast, scalable .NET apps. Introduced in C# 5 back in 2012, the C# async and...
NDepend May 22, 2026

Modern C# Hello World

May 21, 2026 9 minutes read The modern C# Hello World is a single line of code: [crayon-6a2714a1cf4d1767855237/] No class, no Main() method and no using directive to write. Three...
NDepend May 21, 2026

C# Record Explained

May 11, 2026 7 minutes read A C# record is a lightweight, data-centric type designed primarily for storing and representing values rather than implementing behavior. Introduced in C# 9, the...
NDepend May 11, 2026

Boxing in C#: What It Costs You and How to Get Rid of It

April 21, 2026 9 minutes read Boxing in C# is the conversion of a value type (an int, a struct, an enum, etc.) into an object reference or an interface...
NDepend April 21, 2026

The Road to Visual Studio 2027

April 16, 2026 9 minutes read At the Visual Studio Live! Las Vegas 2026 keynote, Mads Kristensen laid out the vision for the future of development tools—centered on a bold...
NDepend April 16, 2026

LLM Chat in .NET with IChatClient: The Complete Guide

April 9, 2026 9 minutes read The IChatClient interface from the Microsoft.Extensions.AI package offers a clean, unified way to integrate LLMs like OpenAI, Copilot, or Anthropic into your application. It’s...
NDepend April 9, 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

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