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 344 of 397IEnumerable vs IEnumerator in C#: Key Differences
Understand how IEnumerable and IEnumerator work in C#, how foreach uses both interfaces, and when to implement each interface directly.
C# Iterator: How yield return Works
Understand how C# iterators work with yield return, including deferred execution, the generated state machine, and practical performance considerations.
C# Property vs Indexer: Key Differences and Usage
Understand the differences between C# properties and indexers, including syntax, use cases, and when to choose each for clean, maintainable code.
C# Multiple Parameter Indexer: Syntax and Use
C# indexers can take multiple parameters to expose natural syntax such as `matrix[row, column]`. This article covers declaration syntax, overloads, composite keys, and common pitfalls.
C# Indexer get and set: Syntax and Usage
Learn how to implement C# indexers with get and set accessors, including syntax, validation logic, overloading, and performance considerations.
C# Indexers: Syntax, Usage, and Tradeoffs
Learn how to declare and use C# indexers with the `this` keyword, including syntax, overloads, read-only access, and practical tradeoffs.
C# Indexer: Syntax, Usage, and Performance
Learn how to define and use C# indexers for array-like access in custom collections, including syntax, overloads, and performance considerations.
C# User Defined Conversion Operator Explained
Understand C# user-defined conversion operators: syntax, implicit vs explicit choices, rules, and practical examples for custom type conversions.
C# Explicit Operator: Defining Custom Type Conversions
Learn how to define explicit conversion operators in C# with syntax, practical examples, and guidance on when to use them safely.
Using C# Implicit Operators to Convert Types Cleanly
Learn how C# implicit operators create clean, lossless conversions between related types, where they are a good fit, and when to prefer explicit operators or named methods.