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 367 of 397C# Tuple vs ValueTuple: Which One Should You Use?
Understand the differences between C# Tuple and ValueTuple, including memory behavior, syntax, and when to choose each for returning multiple values.
C# Tuple Deconstruction: Syntax and Practical Use
c# tuple deconstruction: Learn C# tuple deconstruction to unpack tuple values into variables, including discards, custom types, and practical patterns.
C# Named Tuples: Syntax and Practical Usage
Learn how to declare, access, and return C# named tuples, and understand when they are a better choice than anonymous types.
C# Tuple Multiple Return Values: Syntax and Usage
Learn how to use C# tuples to return multiple values from methods. This guide covers tuple syntax, named elements, deconstruction, ValueTuple performance tradeoffs, and when to choose a custom class or record instead.
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.