Hidden Gems in Software Development

.NET ships an enormous surface area, and the documentation rewards teams that read past the first page of release notes. Most projects never enable Central Package Management, never replace ad-hoc string.IndexOfAny calls with SearchValues<T>, and never turn on the nullable reference type analyzers that would have caught last week’s NullReferenceException at compile time. The features exist. The defaults just don’t make them visible.

This collection documents the APIs, MSBuild properties, Roslyn analyzers, and CLI flags that already sit in the framework but rarely get switched on. Each article picks a single capability, explains the problem it solves, and shows the diff that adopts it. The goal is not breadth — it is the kind of specificity that lets you copy the relevant lines into your own Directory.Build.props or analyzer ruleset the same afternoon.

Performance-oriented gems get particular attention because they often deliver measurable throughput without a refactor. SearchValues<T> collapses byte-set lookups into vectorized intrinsics. CompositeFormat lifts format-string parsing out of hot paths. StringValues removes allocations in HTTP header handling. Each of these existed for a release or two before becoming visible in profiles, and each replaces a pattern most teams still ship.

The collection also covers build-system and tooling gems that change daily friction more than headline performance. Central Package Management consolidates version drift across multi-project solutions. The BuildingInsideVisualStudio MSBuild property lets you condition slow targets out of IDE builds without breaking CI. .NET CLI flags around incremental restore and binary logging shorten the inner loop in ways the defaults don’t.

These are not framework deep dives for the sake of trivia. They are the small adoption decisions that compound across a codebase — the difference between a .NET solution that feels modern and one that runs on the same patterns it had in 2019.

Stop Parsing the Same String Twice: CompositeFormat in .NET

Stop Parsing the Same String Twice: CompositeFormat in .NET

Every time you call string.Format() with the same format string, .NET parses it again. And again. And again. CompositeFormat changes that: parse once, reuse forever. The result? Up to 30% faster formatting, fewer allocations, and a one-line code change. Here’s why this matters and how to use it.
How SearchValues Saved Us From Scaling Hell

How SearchValues Saved Us From Scaling Hell

While you’re busy optimizing database queries and adding cache layers, thousands of string searches per second are quietly eating your CPU budget. The problem isn’t visible in your APM dashboard because it’s distributed across every request. But it’s there. Compounding. Scaling linearly with load.

I discovered this the hard way when a log processing API started choking under production traffic. The bottleneck? String validation and sanitization. The fix? A .NET 8 feature that delivered a 5x performance improvement and let us shut down servers instead of adding them. And it’s gotten even better in .NET 9 and 10.

Still Waiting for the Final Piece: C# 14 Comes Close

Still Waiting for C# 14

C# 14 introduces the new ‘Extension Everything’ syntax—an elegant step toward more expressive code, yet one that still can’t quite match VB.NET’s classic ByRef magic. A humorous reflection on what’s almost, but not fully, possible in .NET 10.
Understanding the C# `StringValues`: A Comprehensive Guide

Understanding the C# `StringValues`: A Comprehensive Guide

In C#, the StringValues struct belongs to the Microsoft.Extensions.Primitives namespace, which is widely used in modern .NET applications. This struct plays a crucial role in efficiently managing string collections, especially when handling efficiently, particularly in contexts where multiple strings are involved. In this blog post, we’ll explore the purpose, usage, and key features of the StringValues struct in C#.

BuildingInsideVisualStudio: .NET Project Properties

BuildingInsideVisualStudio

In the ever-evolving world of .NET development, managing project configurations effectively is crucial for maintaining a clean and efficient build process. One of the less frequently discussed but highly useful properties is BuildingInsideVisualStudio. This property, when correctly utilized, can streamline your build process and ensure that your project is configured properly depending on the build environment. In this article, we’ll explore the BuildingInsideVisualStudio property with concrete examples and discuss best practices for using it effectively.