Revision
Cheat sheets
C# Language cheat sheets
54 resultsClear filters
- ArticleFree
Grouping with GroupBy and Common Aggregates in LINQ to Objects
Learn how to group in-memory collections with GroupBy and compute common aggregates like Count, Sum, Average, Min, and Max for reporting and interview-style problems in LINQ to Objects.
C# Language
- ArticleFree
Select vs SelectMany in LINQ to Objects: Projection or Flattening
Learn how to choose between Select and SelectMany in LINQ to Objects by recognizing when you want one output per input versus flattening nested sequences into a single stream.
C# Language
- ArticleFull Access
Generics, Delegates, Events and Iterators in C#
Type parameters and constraints, delegates and events, and how iterators and the yield keyword work.
C# Language
- ArticleFree
C# Records, Value Equality, and with-Expressions for Interviews
A deep interview-ready lesson on C# records, how value equality differs from reference equality, and how with-expressions support safe nondestructive copying.
C# Language
- ArticleFull Access
IEnumerable, IEnumerator and IAsyncEnumerable in C# (with yield)
How foreach and the iterator pattern work under the hood, how yield builds iterators, and how IAsyncEnumerable streams data asynchronously.
C# Language
- ArticleFree
FrozenDictionary and FrozenSet: Snapshots and Mutation Traps
Learn how to build immutable, lookup-optimized snapshots with FrozenDictionary and FrozenSet, preserve equality semantics, avoid mutation traps, and decide when freezing is worthwhile.
C# Language
- ArticleFree
Frozen Collections in .NET: Comparers and Trade-offs
Understand how .NET frozen collections turn completed data into stable lookup snapshots, how comparer choices define their behavior, and when their construction cost is justified by repeated reads.
C# Language
- ArticleFull Access
C# OOP as Type Design: Types, Members and Relationships
C# OOP is best understood as designing stable, meaningful types and relationships.
C# Language
- ArticleFull Access
Learning C# and .NET: Fundamentals to Advanced Topics
A tour of C# and .NET from the fundamentals to collections, async/await, threading and expression trees.
C# Language
- NoteFree
LINQ to Objects Execution and Enumeration Checklist for Interviews
A practical revision lesson on deferred vs immediate execution, repeated enumeration, snapshots, and the interview traps that appear when LINQ to Objects is evaluated more than once.
C# Language
- ArticleFree
Choosing Select or SelectMany in C# LINQ with Order-Line Examples
Learn when to use Select versus SelectMany in LINQ by modeling orders and order lines. This lesson shows projection, flattening, empty inner sequences, and the shape of the resulting data.
C# Language
- NoteFull Access
Why Mutating Dictionary Keys Breaks Lookup in C#
Learn why changing equality-relevant fields after inserting an object into Dictionary or HashSet makes lookup unreliable, and how to design safer alternatives for .NET code.
C# Language
- NoteFull Access
Choosing Ordinal Comparers for Dictionary and HashSet
Learn how Dictionary<string,TValue> and HashSet<string> use a string comparer to define lookup and uniqueness, and why ordinal comparers are the safest default for backend keys.
C# Language
- NoteFree
Source generators at a glance
Compile-time source, analyzer references, incremental caching, and what a driver test must assert.
C# Language