Browse by Topic
Popular
Popular Posts
Latest
Latest C# Posts
C# Tuple Declaration: Syntax and Usage
c# tuple declaration: Learn C# tuple declaration syntax, named members, deconstruction, and when to use ValueTuple over custom types.
C# Tuple Usage: Syntax, Deconstruction, and Tradeoffs
c# tuple usage: Practical C# tuple usage: declaration syntax, named members, deconstruction, method returns, and when a tuple beats a custom type.
C# Positional Record: Syntax and Behavior
C# positional records provide a concise syntax for immutable data models. Learn how the compiler generates properties, value equality, deconstruction, and when to prefer records over classes.
C# Record Deconstruct: Extract Fields Cleanly
Learn how C# record deconstruction extracts fields into variables. Includes positional records, custom Deconstruct methods, discards, pattern matching, and common pitfalls.
C# Record Equality: How It Works and When to Customize
Understand how C# records implement value-based equality, when the default behavior is sufficient, and when to override Equals and GetHashCode for collections or custom rules.
C# Record with Expression: Copy and Modify Records
Learn how to use C# with expressions to create modified copies of immutable records, with practical examples and limitations.
C# 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.