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...
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...
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...
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...
.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....
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,...
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-6756b9a70dd13254880539/] Because...
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...
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...
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...
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...
Cyclomatic Complexity in C#: Everything You Need to Know
October 21, 2024 3 minutes read Cyclomatic complexity is a code metric used to measure the complexity of a program’s control flow. In C#, it represents the number of independent...
NDepend vs. ReSharper
October 14, 2024 1 minutes read Not too long ago, someone asked me for a comparison of ReSharper (commonly and affectionately abbreviated R#) and NDepend. I didn’t really grok the...
Reporting ReSharper Code Inspections from Your CI/CD Pipeline
October 11, 2024 4 minutes read JetBrains ReSharper is an awesome well-established tool now over two decades old! It offers hundreds of code inspections for C# and VB.NET. These inspections...
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...
.NET – 7 Decompiler Compared (2024)
August 12, 2024 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...
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,...
Avoid Technical Debt with NDepend
July 14, 2024 2 minutes read The term “technical debt” has become ubiquitous in the programming world. In the most general sense, it reflects the idea that you’re doing something...
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...
Enterprise Architecture with .NET [Book Presentation]
July 2, 2024 6 minutes read Introducing the brand new book, Enterprise Architecture with .NET. This comprehensive 772-page guide is designed to elevate your career from a regular .NET developer...
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...
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....
C# Array and List Fastest Loop in 2024
June 12, 2024 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...
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...
.slnx The New .NET Solution XML File Format
May 28, 2024 3 minutes read Since Visual Studio 2022 17.10 preview, we can see a new .NET solution file format with file extension .slnx. For example for this simple...
A Test Coverage Primer for Managers
May 27, 2024 5 minutes read Managing Blind Let me see if I can get in your head a little bit. You manage a team of developers and it goes...
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...
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...
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...
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...