NDepend Blog

Improve your .NET code quality with NDepend

WPF / Winforms UI Refactoring: A Case Study

May 11, 2022 4 minutes read WPF and Winforms are still so massively used that Microsoft fully supports those technologies in .NET Core, .NET 5, 6 , 7 and so...
NDepend May 11, 2022

How to collect return values from Parallel.ForEach?

January 26, 2022 1 minutes read Today I took 10 minutes to answer the 9 years old stackoverflow’s question: How do I collect return values from Parallel.ForEach? I though the...
NDepend January 26, 2022

C# Binary Search: Fast find of a free slot between 0 and uint.MaxValue

January 3, 2022 2 minutes read When a user is exporting a result to a document with NDepend, the tool needs to find a file name not taken in the...
NDepend January 3, 2022

Solution to Visual Studio 2022 messing up Visual Studio 2019

November 10, 2021 3 minutes read As all .NET developers I am quite excited by Visual Studio 2022 and .NET 6 going RTM. However I noticed that Visual Studio 2022...
NDepend November 10, 2021

5x Lessons Learned from Migrating a Large Legacy to .NET Core

October 26, 2021 9 minutes read In January 2020 I wrote the post Not planning now to migrate your .NET 4.8 legacy, is certainly a mistake. Hopefully we followed our...
NDepend October 26, 2021

Debugging a .NET App on Linux from Windows Visual Studio with WSL

September 15, 2021 6 minutes read NDepend analysis, reporting, API and Power-Tools will run on Linux and MacOS with the next version 2021.2. To achieve that, a major refactoring session...
NDepend September 15, 2021

Code Testability: A Case Study

September 1, 2021 2 minutes read [crayon-68c337006e4ac734559951/] This method is untestable because its logic depends on NdpOperatingSystem.Kind which returns an OSPlatform object. Notice the usage of the attribute UncoverableByTest that...
NDepend September 1, 2021

3 productivity Resharper features missing in Visual Studio

August 10, 2021 5 minutes read Resharper is a great Visual Studio productivity extension but on the other hand it slows down significantly the IDE, especially when working with large...
NDepend August 10, 2021

What is Code Review? – Guidelines and Best Practices

July 19, 2021 9 minutes read Code review is the process of mandating systematically one or several developers to review the code written by another developer in other to detects...
NDepend July 19, 2021

Top 10 New .NET 6.0 API

July 7, 2021 5 minutes read .NET 6 introduces new handy APIs that will make our development journey easier. Let’s go through the top 10 new API in terms of...
NDepend July 7, 2021

How to Logically Name Embedded Resources in .csproj?

June 16, 2021 1 minutes read You can work with .NET for two decades and still discover some useful stuff.  One thing that bothered me till now is that an...
NDepend June 16, 2021

Migrating Delegate.BeginInvoke Calls to .NET Core, .NET 5 and .NET 6

May 26, 2021 3 minutes read In this 2019 post, the .NET Base Class Library engineers announced that the good old Delegate.BeginInvoke .NET Framework syntax wasn’t supported in .NET Core...
NDepend May 26, 2021

On replacing Thread.Abort() in .NET Core

May 19, 2021 3 minutes read Thread.Abort() is not supported in .NET 5 / .NET Core We are actually migrating the NDepend analysis and reporting to .NET 5 and figured...
NDepend May 19, 2021

Visual Studio 2022 64 bits: Elements of history

May 11, 2021 7 minutes read Finally after all these years of waiting Visual Studio 2022 will run in a 64 bits process on 64 bits machines! As a consequence...
NDepend May 11, 2021

Clean Architecture Refactoring: A Case Study

April 27, 2021 9 minutes read Introduction to Clean Architecture The recent post Clean Architecture for ASP.NET Core Solution: A Case Study explained that one of the most interesting property...
NDepend April 27, 2021

Hungarian Notation for Fields in C#

April 21, 2021 6 minutes read If there is one topic that divides the C# developers community, it is the Hungarian notation for fields. In our team we rely on...
NDepend April 21, 2021

6 Reasons Visual Studio Theme Affects Productivity

April 14, 2021 4 minutes read Themes can be fascinating. Humans are vulnerable to attachments. It could be anything – person, thing, color, food, etc. some people are attracted to...
NDepend April 14, 2021

Implementing a Domain with POCO (Plain Old CLR Objects)

April 8, 2021 5 minutes read Here is a remark I noticed on my recent post Clean Architecture for ASP.NET Core Solution: A Case Study and I’d like to detail...
NDepend April 8, 2021

8 Books to Improve as a .NET Developer

March 31, 2021 4 minutes read Nowadays all information a developer needs to know is available online for free. Blogposts and videos authored by experts, giant questions and answers websites,...
NDepend March 31, 2021

How to Plan Large-Scale Refactoring?

February 23, 2021 6 minutes read   The .NET platform exists for two decades and nowadays the technology is evolving faster than ever. It is now time for serious .NET...
NDepend February 23, 2021

10 Reasons Why You Should Write Tests

February 9, 2021 8 minutes read As many, I started programming when I was a child 3 decades years ago. With no doubt, the most important practice I’ve adopted during...
NDepend February 9, 2021

Include IL Offset into Production Exception Stack Traces

February 2, 2021 3 minutes read In a previous post The proper usages of Exceptions in C# I explained that it is important to get as much information as possible...
NDepend February 2, 2021

Is Artificial Intelligence Assisted Coding the Next Developer Productivity Silver Bullet?

January 26, 2021 9 minutes read The famous Fred Brooks paper “No Silver Bullet – Essence and Accident in Software Engineering“ published in 1987 stated that: “there is no single development,...
NDepend January 26, 2021

Visual Studio IntelliCode : AI Assisted Coding

January 19, 2021 5 minutes read We are all amazed by recent progresses made possible thanks to Artificial Intelligence (AI). In 2017 Microsoft announced Visual Studio IntelliCode which used Machine...
NDepend January 19, 2021

How we quickly refactored with Resharper more than 23.000 calls to Debug.Assert() into more meaningful assertions

January 11, 2021 6 minutes read Since the NDepend inception more than 15 years ago, we stuffed our code with calls to Debug.Assert(). This results today in more than 23.000...
NDepend January 11, 2021

The proper usages of Exceptions in C#

December 16, 2020 9 minutes read The C# exception basics are generally well understood. However exceptions are often used as a way to sweep error handling duty under the carpet....
NDepend December 16, 2020

The proper usages of the keyword ‘static’ in C#

December 8, 2020 6 minutes read The keyword static is somewhat awkward in a pure Oriented-Object world. I would like to explain here what are the right usages of static I...
NDepend December 8, 2020

Code Smell – Primitive Obsession and Refactoring Recipes

December 1, 2020 5 minutes read Primitives are the real building blocks of your class and its use is obviously inevitable. But the real problem starts when they are not...
NDepend December 1, 2020

Using C#9 record and init property in your .NET Framework 4.x, .NET Standard and .NET Core projects

November 25, 2020 2 minutes read C#9 record and C#9 init property are really nice addition to the language. As explained in C#9 records: immutable classes, both are syntactic sugar...
NDepend November 25, 2020

Visualize Code with Software Architecture Diagrams

November 10, 2020 9 minutes read The source code is the design. This famous motto means that no matter how many diagrams you draw and discuss with your colleagues, the...
NDepend November 10, 2020