Skip to main content

Newsletter Archive

Browse through our collection of past newsletters. Each edition is packed with C# and .NET insights.

Page 11 of 11 (32 editions)

January 14, 2026

Does C# 14’s field Keyword Replace FluentValidation?

A crisp walkthrough of C# 14’s field keyword and why it doesn’t replace FluentValidation. Field streamlines property-level invariants by letting you set the compiler-generated backing field directly, while FluentValidation remains the go-to for contextual, cross-property, user-friendly input rules at application boundaries. The upshot is a layered approach: field for safeguarding domain integrity, FluentValidation for rich input validation.

Rock Your Code: Code & App Performance for Microsoft .NET (5th Edition)

David McCarter’s Rock Your Code: Code & App Performance for Microsoft .NET (5th ed.) is a hands-on, benchmark-driven guide to writing fast, scalable C# for .NET 10 and beyond. It dives into real-world patterns for memory, collections, LINQ, strings, I/O, and more plus analyzers, caching, logging, serialization, source generators, and the Spargine library balancing runtime speed with cloud cost. A companion to his coding standards book, it helps you think like a performance engineer from the first line of code.

The Complete Guide to C# .NET Input Controls

Ever wrestled with phone-number masks, culture-aware numbers, or a dropdown that needs to be searchable? This guide surveys C#/.NET input controls text, masked, numeric, date/time, and selection then shows how ComponentOne’s editors (C1TextBox, C1MaskedTextBox, C1NumericBox, C1DateRangePicker, C1MultiSelect, etc.) bring validation, formatting, and localization together across WinForms, WPF, ASP.NET Core, Blazor, WinUI, and .NET MAUI. It’s a practical look at when to stick with native widgets versus reaching for richer controls to cut boilerplate and keep behavior consistent.

Channels in C# .NET: Building High-Performance Concurrent Pipelines

A friendly primer on System.Threading.Channels shows how to build high-throughput, async pipelines in .NET without drowning in locks and polling. It contrasts Channels with ConcurrentQueue and manual synchronization, highlights bounded channels for built‑in backpressure, and walks through producer/consumer patterns using ChannelWriter/Reader, await foreach, and graceful completion. You’ll also get practical use cases, best practices, and context on why ASP.NET Core leans on Channels for predictable performance under load.

TDD in .NET: Practicing TDD in a Web API Project

Ajay Kumar walks through a pragmatic, layered TDD approach for a .NET Web API by building a “get expenses by category” endpoint in an Expense Manager app. He splits responsibilities across controller, service, and repository, using Moq and in-memory fakes to keep tests fast, DTOs to protect boundaries, and the red–green–refactor loop to guide design. It’s a clear blueprint for what to test, what to mock, and how to keep your API thin, tidy, and change‑friendly.

The C# ‘Best Practice’ that is secretly killing your API performance

A cautionary tale for clean-code fans: spinning up a new HttpClient in a using block per request can quietly trigger socket exhaustion under load thanks to TIME_WAIT. The author recounts a real production outage at an event check-in system and shows how IHttpClientFactory, named clients, and DI-backed connection pooling fix it with reused sockets and sensible timeouts. A crisp reminder that HttpClient is special and how to keep high-throughput .NET APIs from melting their ephemeral ports.

Don't miss the next tip 💧

Get a .NET tip and curated links delivered to your inbox every week.

Practical JWT Mastery in .NET

Part 4 of a practical JWT-in-.NET series strips the mystery from signatures covering hash basics, HMAC (HS256), and why symmetric keys can bite you in microservices. It contrasts RSA/ECDSA’s private/public split, introduces JWKS for safe rotation and discovery, previews verification in code, and tees up how a validated token becomes HttpContext.User reminding us that strong, well-guarded keys (not algorithm glitter) keep your APIs honest.

The 10 Most Interesting C# Bugs We Found in Open Source in 2025

Static-analysis sleuthing meets real-world C# in a roundup of ten noteworthy bugs uncovered across open-source projects in 2025. Rather than just gawking at glitches, it teases out the patterns behind them and how analyzers and better idioms can catch issues earlier handy guardrails for your day-to-day .NET work. A light, practical tour of pitfalls that quietly ship to prod and the habits that keep them from tagging along.

.NET 10 & C# 14: Less Code, Better Performance

.NET 10 and C# 14 get a down-to-earth walkthrough aimed at everyday dev pain points less boilerplate, more zip. On the C# side you’ll see chained ??= for deep object graphs, a new field keyword to safely work with auto-property backing fields, and ref/out/in-friendly lambdas for zero-copy hot paths. Platform-wise, it highlights cleaner left-join patterns and JSON partial updates in EF Core, built-in validation for minimal APIs, and friendlier quick-script workflows practical wins from CRUD to performance-heavy code.

Enable Modern Run dialog box in Windows 11

Windows 11 Insider builds are rolling out a modernized Win+R Run dialog, and this walkthrough shows how to enable it either via a Settings toggle or a quick registry edit, then restart Explorer). Targeting recent Dev/Beta previews like build 26220, it’s a small but welcome quality-of-life tweak for developers who live in Win+R to launch tools, scripts, and system commands.

Getting Started with Microsoft Agent Framework

A friendly, code-first tour of Microsoft Agent Framework (MAF) positioned as the successor to Semantic Kernel showing how to build C# agents with tool/function calling, strongly-typed structured outputs, and durable threads without playing framework roulette. It also covers RAG with a vector store and TextSearchProvider plus Azure AI Foundry’s managed agents, illustrating how MAF blends SK’s integrations with AutoGen-style orchestration to take you from local experiments to production.

Background Jobs in .NET: Hangfire, Quartz, Temporal in 2026

A clear, real-world guide to background work in .NET 9+, comparing BackgroundService, Hangfire, Quartz.NET, and Temporal what each does well, how retries with exponential backoff are handled, and how to wire up monitoring and tracing with OpenTelemetry. It includes concise C# examples and a pragmatic decision map to know when a simple hosted service will do, when you need a scheduler and dashboard, and when your flows call for a durable workflow engine in 2026.

January 12, 2026

Create and Read JWT Tokens in C# .NET

A quick, code-first walkthrough of creating and reading JWTs in C# using System.IdentityModel.Tokens.Jwt covering claim selection, HMAC-SHA256 signing, and parsing token headers/claims without validation. It emphasizes real-world guardrails (JWTs are readable, validate on the backend, set expirations, and prefer certificates over shared secrets) and points toward production patterns like refresh tokens and role-based authorization. A tidy primer whether you’re prototyping an auth flow or tightening up an API.

How to generate Code Coverage for a .NET Solution

David Guida walks through wiring up Coverlet to generate solution‑wide code coverage in .NET, including a GitHub Actions pipeline that merges results across test projects, outputs both JSON and OpenCover, and drives a README badge. He also covers the real-world gotchas: running tests sequentially (-m:1) to avoid cross-project contamination and excluding test assemblies via a .runsettings file so your numbers actually mean something. A tidy, copy‑pasteable setup to keep your .NET 8 codebase honest without a build-pipeline yak shave.

Azure Cost Estimation: Your Strategic Guide to Cloud Pricing

Azure Essentials tackles unpredictable cloud bills with a practical, three-layer approach to estimating Azure costs architecture, configuration, and usage so your .NET workloads don’t surprise the finance team. Thomas Maurer and Britt walk through modeling scenarios with the Azure Pricing Calculator and Azure Migrate, then show how Azure Advisor, Cost Management, Copilot in Azure, and Monitor help refine and optimize over time. A clear, developer-friendly blueprint for turning “it depends” into numbers you can plan around.

C# 14 in Action: High-Performance Lambda Expressions with Parameter Modifiers

C# Corner breaks down how C# 14 levels up lambdas with parameter modifiers (ref, in, out), pushing them closer to full method parity for clearer intent and faster paths in real-world code. Through scenarios like hot-loop updates, large-struct reads, Try-parse patterns, and buffer processing, it shows how these enhancements trim boilerplate, improve API design, and keep performance-sensitive code as readable as your favorite LINQ.

7 Mistakes .NET Developers Should Avoid

This concise guide calls out seven career-slowing pitfalls for .NET devs and offers practical upgrades: move from .NET Framework to .NET 6/7/8 and ASP.NET Core, write cleaner SOLID code, practice C# problem-solving, and get comfortable with Azure, Docker, Git, and CI/CD. It also reminds us that communication, documentation, and tests aren’t extras they’re how you ship confidently. A friendly gut-check for keeping skills sharp and relevant.

Digital Essentialism in .NET: How Verdict is Redefining the Result Pattern

Meet Verdict, a ‘digital essentialism’ take on the Result pattern for .NET that uses a readonly struct to keep the happy path allocation-free backed by eye-popping benchmarks (e.g., 189x faster than FluentResults) and far less GC pressure. It pairs the lean core with opt-in goodies like ASP.NET Core ProblemDetails mapping, LoggerMessage-based logging, async chaining, and multi-error validation handy for APIs and microservices chasing lower latency and lower cloud costs.

Don't miss the next tip 💧

Get a .NET tip and curated links delivered to your inbox every week.

Partial Events and Constructors in C# 14 (.NET 10) Explained with Examples

C# 14 (on .NET 10) introduces partial constructors and partial events, finally letting you split initialization and event accessors across files so source-generated and hand-written code play nicely together. The article walks through practical patterns init hooks, customizable add/remove accessors, and generator-friendly APIs plus gotchas, best practices, and why there’s no runtime cost. A tidy upgrade for anyone juggling source generators, ORMs, or UI frameworks who wants cleaner seams and fewer merge headaches.

Hybrid Cache & Output Caching in .NET: A Game Changer for High-Performance Applications

A friendly walkthrough of Hybrid Cache and Output Caching in modern ASP.NET Core, showing how Hybrid Cache marries IMemoryCache speed with distributed stores (like Redis) behind a single, resilient API while Output Caching serves full HTTP responses instantly. With clear code snippets and a realistic e‑commerce scenario, it highlights when these patterns shine (and when they don’t) and the kind of gains you can expect think ~300ms down to ~20ms and far fewer DB hits on read‑heavy endpoints. Less cache plumbing, more throughput.

SQL Server Regular Expression Performance and Guidelines

SQL Server 2025 brings native regex functions to T‑SQL (compat level 170), and Ben Johnston road-tests them with practical, real-world guidance. The headline: REGEXP_REPLACE is often a big win that simplifies gnarly text cleanup, but REGEXP_LIKE can be 10–50x slower than LIKE on big tables and tends to scan rather than seek so filter first and test, especially with Unicode. He maps each regex function to its legacy counterpart, showing where they shine (imports/parsing) and when the old standbys are still the better choice.

Changing Immutable Collections

Jon Skeet explains why, for build-once/read-many workloads, FrozenDictionary and ImmutableArray can beat ImmutableDictionary and ImmutableList and shows the usage patterns that make the difference. He details a mostly drop-in migration (new namespace, Count→Length, value-type nullability tricks with .Value or pattern matching) and the real-world gotchas. The payoff: read-heavy validation fell from ~5.5ms to ~0.826ms, with some naming nitpicks and value-type awkwardness as the only lingering gripes.

What’s New with APIs in .NET 10: Taking a Look at Real Improvements

Dave Brock walks through .NET 10 and C# 14 from an API developer’s seat, using a tidy order-management API to show why the changes matter in practice. Highlights include built-in Minimal API validation with ProblemDetails, OpenAPI 3.1 (including YAML endpoints), SSE support, and EF Core 10’s named query filters for safer multi-tenant data plus C# 14’s field keyword, null-conditional assignments, and extension members to trim boilerplate. A practical, no-drama tour of upgrades that make APIs cleaner, better documented, and easier to evolve.

C# Smart Enums: advanced

Part 3 of the Smart Enums series shows how to end the copy‑paste parade by moving enum lookup logic into a generic base class that uses the CRTP pattern. With a per‑type static dictionary, Initialize() to skip reflection, and Get/GetOrDefault/TryGet APIs, you get O(1) lookups, strict type safety, and zero boilerplate perfect when your app juggles lots of status types. Tested on .NET 6, with references to generics constraints and Ardalis.SmartEnum for production‑grade inspiration.