All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,965 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 368 of 397C# Record Constructor: Syntax and Customization
C# record constructors: how positional parameters generate a primary constructor, when to replace it, validation, record structs, and the copy constructor used by with expressions.
C# Record vs Struct: Choosing the Right Type
Learn the practical differences between C# records and structs: reference vs value semantics, equality, immutability, performance, and when to choose each.
C# Record vs Class: Choosing the Right Type
Learn the key differences between C# records and classes, including equality, immutability, and when to use each type in your code.
C# Record Usage: Syntax, Equality, and Tradeoffs
Understand C# records: declaration syntax, value equality, with-expressions, inheritance, and when records fit better than classes or structs.
Understanding C# Struct Value Type Behavior
See how C# structs copy on assignment and method calls, where mutation of structs in collections can fail, and when value type behavior matters for performance.
C# Struct Copy Behavior: Value Type Semantics Explained
Understand how C# structs are copied by value, why it matters for performance and correctness, and how to control copy behavior with ref, readonly, and in parameters.
C# record struct: Value Semantics with Record Features
Record structs combine C# value-type semantics with record syntax. See how positional declarations, value equality, mutation, readonly variants, and performance tradeoffs work, and when to choose one over a record class or plain struct.
C# ref struct: Constraints and Practical Use
Learn how C# ref struct types enforce stack-only allocation, what compiler restrictions they carry, and how Span<T> uses them for safe, allocation-free memory access.
C# Readonly Struct: When and How to Use
c# readonly struct: Learn how C# readonly structs prevent defensive copies, enforce immutability, and when they improve performance.
C# Struct Constructor: Rules and C# 10 Changes
c# struct constructor: Learn C# struct constructor rules: parameterized constructors, implicit parameterless initialization, C# 10 field initializers, and performance.