Collection Performance: Introducing FrozenSet in .NET 8: Benefits and Benchmark PerformanceCollection Performance

.NET version 8 introduced the FrozenSet type, offering immutable and hashable set collection with benefits including improved performance, memory efficiency, and thread safety. Benchmarks show comparable performance to List, outperforming HashSet and ImmutableHashSet. However, it is slightly slower than the latter in lookups. FrozenSet offers significant advantages for concurrent applications and memory optimization.

Collection Performance: Enhancing Dictionary Performance with FrozenDictionary

The FrozenDictionary is a thread-safe, immutable, read-only dictionary optimized for fast lookups. It outperforms the Dictionary, reducing iteration and lookup times significantly.

DotNetDave Rocks On .NET Live: Performance Improvements in .NET 8

On June 10th, 2024 at 9 AM PST, I'll be appearing on "On.NET Live" for the second time. We'll delve into code performance in .NET 8 through the Code Performance Game. Join the live show for an engaging session. For more details, visit https://youtu.be/4WX14dsnKsg.

256 Seconds with dotNetDave: Handling Exceptions Part 1 – Reusable Assemblies

This content discusses exception handling in Microsoft .NET, focusing on application layer and reusable assemblies. It offers insights on preventing exceptions and notifying calling code, and references a related book. The principles are noted to be applicable to other programming languages.

Serializing Objects: Efficient Serialization and Deserialization of Collections with JsonSerializer

The article demonstrates the ease of serializing and deserializing collections using JsonSerializer.

Rockin’ the Code World Season 4: Special Guest Steve Stedman

The upcoming episode on C# Corner TV, show #104, will feature Steve Stedman, CEO of Stedman Solutions LLC. The interview will focus on "Getting to retirement in tech."

Microsoft .NET Code Analysis: Eliminating Dictionary Double Lookups

Using ContainsKey() followed by an indexer on dictionaries results in a double lookup, decreasing performance. This is common anti-pattern. This article will show you how to fix this and increase performance up to 2x.

Optimizing Collection Examination: A Comparative Analysis of Predicate Methods in C#

The article explores four methods for examining items in a collection using predicates, with a focus on performance. A Twitter poll revealed that over 50% of developers favored the LINQ Any() method, prompting the author to verify its efficiency in comparison to other options like Count() and Exists().

Rockin’ the Code World Season 4: Special Guest Jim Wilcox

I hope you'll join me on Saturday, June 1st, 2024, at 10:00 AM PST on C# Corner TV for show #103! My very special guest for the second time will be Jim Wilcox, Principal Software Consultant and Architect with EQengineered.

Understanding and Utilizing Common Attributes in Classes in Microsoft .NET

Attributes in .NET provide crucial metadata that enhances code clarity, tooling support, and developer experience. They enforce contracts, improve static analysis, and facilitate safe coding practices. By thoughtfully utilizing attributes like [DisallowNull], [DebuggerDisplay], and [DefaultValue], developers can create expressive, maintainable, and user-friendly APIs that benefit both current and future projects.