Simplify Immutable Data Modeling with C# 9 Record Types
Learn how C# 9 records cut boilerplate for immutable data models, with a concrete Point2D example, pattern‑matching tips, and guidance on trade‑offs.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how C# 9 records cut boilerplate for immutable data models, with a concrete Point2D example, pattern‑matching tips, and guidance on trade‑offs.
C# 11's required modifier turns 'trust me, someone sets this property' into a compile-time guarantee. Here's how it works, where SetsRequiredMembers fits, and why deserializers can still bypass it.
ValueTask avoids heap allocations on synchronous paths in I/O-heavy C# code, but it carries lifetime constraints and struct-size trade-offs. A benchmarked cache-hit example shows 90% allocation reduction—when used correctly.
Enable project-wide nullable reference types to catch uninitialized string assignments at compile time, with C# 8+ requirements and migration trade-offs.
A decision guide for rolling out C# nullable reference types in an existing Visual Studio solution: compare enable vs warnings vs per-file modes, then implement and validate a warnings-first migration.
Nullable Reference Types in C# 8.0 move null safety from runtime to compile time, but require careful adoption at API boundaries and trust edges.
Learn how to spot thread‑pool starvation in ASP.NET Core, diagnose it with metrics and dumps, apply fixes, and know when to look beyond code.
Learn how ReadOnlySpan<T> enables zero-allocation string slicing in C# for high-performance parsing of large datasets without GC pressure.
Source generators move mapping boilerplate from runtime reflection to compile-time code emission. A worked example shows a tiny attribute-driven mapper that produces debuggable, zero-overhead C# during the build.