C# 15 Union Types Explained Simply – A Better Way to Handle Multiple Return Types

C# 15 introduces Union Types — a simple and type-safe way to handle multiple return types. Learn how it works and how to try it with .NET 11 Preview 2.
A curated collection of articles covering C# fundamentals, new language features, real-world examples, and advanced programming techniques for .NET developers.

C# 15 introduces Union Types — a simple and type-safe way to handle multiple return types. Learn how it works and how to try it with .NET 11 Preview 2.

Learn how to generate realistic fake data in C# using Bogus. Includes object generation, custom rules, seeding, localization.

C# 14 introduces powerful improvements like extension members, the new field keyword, cleaner lambdas, null-conditional assignment, and performance-focused features that simplify everyday coding and make .NET 10 apps faster and more expressive.

C# 13, released with .NET 9, introduces powerful new language features that make coding cleaner, safer, and more flexible. From params collections and lock object extensions to partial properties, and expanded ref struct support.

Cache-Aside Pattern in ASP.NET Core is a proven approach to improve performance and scalability, especially when the same data is queried frequently from the database.

In real-world applications, building objects with many optional parameters can become messy fast. You either end up with multiple constructors or an object initializer that’s hard to read and even harder to maintain. hat’s exactly where the Builder Pattern comes…

Learn how the new dotnet run app.cs command in .NET 10 lets you execute C# code without creating a full project. Perfect for quick testing and learning.