2023-11-05 csharpdotnetdotnet-8 .NET 8 GetGenericTypeDefinition performance: a reproducible benchmark Reproduce repeated GetGenericTypeDefinition calls with BenchmarkDotNet and compare selected .NET runtimes without assuming a fixed speedup.
2023-11-02 csharpdotnetdotnet-8 C# How to update a readonly field using UnsafeAccessor A runnable .NET 8 example of a readonly field exposed by UnsafeAccessor, with explicit limits on mutation and observable runtime behavior.
2023-11-01 csharpdotnetdotnet-8 .NET 8 Performance: UnsafeAccessor vs. Reflection Run a reproducible .NET 8 benchmark comparing UnsafeAccessor, reflection, cached reflection, cached delegates and direct calls with observable work.
2023-10-31 dotnetdotnet-8 C# UnsafeAccessor: private members without reflection (.NET 8) Use .NET 8 UnsafeAccessor to access known private constructors, methods, properties and fields, with tested examples and version limitations.
2023-10-29 csharpdotnetdotnet-8 C# – How to mark features as experimental Starting with C# 12, a new ExperimentalAttribute lets you mark types, methods, properties, or assemblies as experimental. Learn how to use it with diagnosticId, pragma tags, and UrlFormat.
2023-10-26 csharpdotnetdotnet-8 C# – How to shuffle an array? The easiest way to shuffle an array in C# is using Random.Shuffle, introduced in .NET 8. It works in-place on both arrays and spans.
2023-10-25 dotnetdotnet-8 System.Text.Json – How to modify existing type info resolver Use the new WithAddedModifier extension method in .NET 8 to easily modify any IJsonTypeInfoResolver serialization contract without creating a new resolver from scratch.
2023-10-24 dotnetdotnet-8 HttpClient get JSON as AsyncEnumerable The new GetFromJsonAsAsyncEnumerable extension method in .NET 8 deserializes HTTP response JSON into an IAsyncEnumerable. Learn how to use it with await foreach.
2023-10-23 dotnetdotnet-8 JsonNode – .NET 8 API updates Explore the new .NET 8 API additions to JsonNode and JsonArray, including GetValueKind, GetPropertyName, GetElementIndex, ReplaceWith, and ParseAsync.
2023-10-22 dotnetdotnet-8 Deep cloning and deep equality of a JsonNode Learn how to use the new DeepClone() and DeepEquals() methods on JsonNode in .NET 8 for deep cloning and comparing JSON nodes.