NDepend Blog

Improve your .NET code quality with NDepend

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

June 3, 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 3, 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

An Introduction to Clean Architecture

May 25, 2026 3 minutes read Clean Architecture in C# and .NET: A Detailed Introduction It seems to me that the topic of software architecture has attracted a lot of...
Erik Dietrich May 25, 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

Cyclomatic Complexity in C#: Everything You Need to Know

May 25, 2026 9 minutes read Cyclomatic Complexity (or CC) in C# is a code metric that counts the number of linearly independent execution paths through a method. Concretely, it...
Erik Dietrich 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-6a232f57f128c828021338/] No class, no Main() method and no using directive to write. Three...
NDepend May 21, 2026

A Guide to Code Coverage Tools for C# in 2026

May 17, 2026 2 minutes read In this post, we’ll walk through 8 different .NET code coverage tools and list their features to help you make a decision. The tools...
Erik Dietrich May 17, 2026

C# Pattern Matching Explained (2026)

May 15, 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 May 15, 2026

Lack of Cohesion of Methods: What Is This And Why Should You Care?

May 14, 2026 2 minutes read Lack of cohesion of methods (usually shortened to LCOM) is one of those things that sits fairly high up on the software hierarchy of...
Erik Dietrich May 14, 2026

Visual Studio Enterprise vs. Professional

May 12, 2026 2 minutes read If you write .NET code for a living, you might spend your day inside Visual Studio. The catch is that “Visual Studio” isn’t one...
Erik Dietrich May 12, 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

Onion Architecture: Going Beyond Layers

April 25, 2026 1 minutes read So you’ve read about the Onion Architecture and think you get it. There are layers in this architecture. They’re onion-like. And they make your...
Erik Dietrich April 25, 2026

Hexagonal Architecture: What Is It and How Does It Work?

April 23, 2026 9 minutes read Hexagonal architecture is a model — or pattern, if you prefer — for designing software applications around a simple idea: put inputs and outputs...
Erik Dietrich April 23, 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

Domain-Driven Design Demystified

April 4, 2026 1 minutes read Domain-Driven Design, usually shortened to DDD, is a software design approach that puts the business problem at the center of the code. Instead of...
Erik Dietrich April 4, 2026

REST vs. RESTful: The Difference and Why the Difference Doesn’t Matter

April 2, 2026 1 minutes read REST API is one of the most popular APIs in the web development community. Most teams reach for it before anything else, and most...
Erik Dietrich April 2, 2026