New ArgumentException and ArgumentOutOfRangeException helpers in .NET 8
Explores new ArgumentException helper methods proposed for .NET 8, including ThrowIfNullOrWhiteSpace and ThrowIfNullOrEmpty for collections.
Steven Giesel is a Senior Software Engineer and Microsoft MVP with over 13 years of experience, specializing in .NET and modern backend development. He shares deep technical knowledge across topics such as C#, EF Core, RavenDB, distributed systems, and cloud-native architectures, and is an active speaker in the .NET community.
323 articles from this blog
Explores new ArgumentException helper methods proposed for .NET 8, including ThrowIfNullOrWhiteSpace and ThrowIfNullOrEmpty for collections.
Explores new code analyzers coming in .NET 8, focusing on performance improvements like case-insensitive string comparisons.
Explains the new FrozenSet and FrozenDictionary collections in .NET 8, detailing their performance benefits and differences from read-only and immutable collections.
Debunks the myth that StringBuilder is always faster in C#, showing scenarios where simple concatenation or List<string> is better.
Explains how to measure heap allocations in .NET and reveals that an empty array consumes 24 bytes due to object overhead.
A guide to using AutoFixture with xUnit to generate anonymous test data, making unit tests more robust and maintainable.
Explains software design patterns like Mediator, Strategy, Singleton, and Proxy using simple sketches and real-world analogies.
Explores the pitfalls of mutable value types in C#/.NET, explaining why they are often avoided and the performance reasons for their limited use.
Explains how to use .NET's ObsoleteAttribute and RequiresPreviewFeaturesAttribute to mark APIs as deprecated or experimental.
A collection of technical infographics covering .NET, C#, Entity Framework, exceptions, operators, and query safety.
Compares C# local functions and lambda expressions, highlighting key differences in recursion, yield usage, and performance.
Explains the difference between 'throw;' and 'throw exc;' in C#, focusing on how the latter truncates the stack trace.
An introduction to LiteDB, a lightweight, serverless NoSQL document database for .NET, exploring its features, use cases, and differences from SQL databases.
Explores two unconventional C# patterns: using foreach on integers and awaiting TimeSpans via extension methods.
A collection of C#/.NET programming infographics covering topics like ConfigureAwait, foreach index, struct mutations, null Tasks, and ThrowHelper.
Explores new low-level C# 11 features allowing ref fields in structs for high-performance scenarios like custom collections and frugal objects.
Explains the cryptographic key exchange in HTTPS, focusing on the Diffie-Hellman algorithm for establishing secure connections.
Explains the WebApplicationFactory in .NET for integration testing ASP.NET Core WebAPIs, highlighting its benefits and usage.
A collection of C#/.NET infographics explaining pure functions, generator functions, and the cost of anonymous types.
Explores the differences between x86 and x64 architectures in .NET, covering JIT compilation, native interop, and practical implications for developers.