2025-01-06 csharpdotnetdotnet-9 .NET Performance: ToList vs ToArray .NET 9 significantly improves ToArray performance using InlineArray, making it faster and more memory-efficient than ToList. See benchmarks comparing .NET 8 vs .NET 9.
2025-01-02 csharp-13csharpdotnet C# 13: Use params collections with any recognized collection type C# 13 extends the params modifier beyond arrays to support Span, ReadOnlySpan, IEnumerable, and other collection types, reducing boilerplate and improving flexibility.
2025-01-01 csharp-13csharpdotnet How to switch to C# 13 How to fix 'Feature is not available in C# 12.0' and switch your project to C# 13 by changing the target framework or setting LangVersion in your .csproj file.
2024-12-01 csharp-14csharpdotnet What’s new in C# 14.0 A summary of all new features in C# 14.0, including the field keyword, extension members, null-conditional assignment, implicit span conversions, and more.
2024-12-01 csharpdotnet C# language version history The evolution of C# has transformed it into a modern, high-performance language. This guide tracks every major milestone. The Early Years (C# 1.0 – 1.2) C# launched in 2002 as a primary language for the .NET Framework. It felt like Java but with a focus on Windows development. Version 1.2 arrived shortly after with small…
2023-11-12 csharpdotnetdotnet-8 C# Randomly choose items from a list In C#, you can randomly select items from a list using Random.GetItems, a method introduced in .NET 8. Learn how it works with practical examples.
2023-11-10 csharpmauidotnet MAUI: How to register handlers in a library Learn how to register view handlers and services from within a .NET MAUI library using the builder pattern and MauiAppBuilder extension methods.
2023-11-09 csharpdotnet How to fix: ‘Point’ does not have a predefined size, therefore sizeof can only be used in an unsafe context Fix the C# error where sizeof cannot be used with Point outside an unsafe context. Two solutions: enabling unsafe code or using Marshal.SizeOf instead.
2023-11-08 csharpdotnetdotnet-8 C# Access private property backing field using Unsafe Accessor Use UnsafeAccessorAttribute in .NET 8 to access auto-generated backing fields of private auto-properties in C# without reflection.
2023-11-06 csharpdotnetdotnet-8 C# ZIP files to Stream .NET 8 includes new CreateFromDirectory and ExtractToDirectory overloads that let you create and extract ZIP files directly to and from a Stream, without writing to disk.