Revision
Cheat sheets
C# Language cheat sheets
54 resultsClear filters
- PDFFree
C# Methods and API Contracts Companion
A ten-page companion to Methods, Parameters, Overloads, and Clear API Contracts, with three .NET 10 programs, output traces, and solved practice on validation, overloads, parameter passing and request models.
10 pages · 81 KB · C# Language
- PDFFree
C# Encapsulation and State Transitions Companion
An eleven-page companion on encapsulation and valid state transitions, with programs and output traces for an exception-ordering defect, read-only views and snapshots, and a solved overdraft exercise.
11 pages · 80 KB · C# Language
- PDFFree
C# Records and Interface Contracts Companion
Worked C# examples for validated records, interface contracts, substitutable implementations and reporting capabilities, with verified outputs and solved practice.
13 pages · 86 KB · C# Language
- PDFFree
C# Collections and Complexity Companion
Worked C# examples for collection choices, equality, ordering and immutable snapshots, with verified outputs and a solved sliding-window rate limiter.
12 pages · 84 KB · C# Language
- PDFFree
C# Generics, Constraints and Variance Companion
Worked C# examples for constrained entity lookup, safe variance and controlled Result states, with complete programs, verified outputs and explained boundary checks.
12 pages · 84 KB · C# Language
- PDFFree
C# LINQ Execution and Performance Companion
Worked C# programs for deferred queries, projection, grouping and reuse boundaries, with verified outputs, a membership-search refactor and a carefully bounded timing experiment.
16 pages · 92 KB · C# Language
- PDFFree
C# Exceptions and Failure Boundaries Companion
Worked C# programs for explicit lookup outcomes, exception translation, cancellation boundaries and preserved stack traces, with verified outputs and solved contract checks.
11 pages · 87 KB · C# Language
- PDFFree
C# Resource Ownership and Disposal Companion
Worked C# programs for ownership, scope exit, asynchronous disposal and stream lifetimes, with verified traces, borrowed-resource checks and solved failure cases.
16 pages · 96 KB · C# Language
- PDFFree
C# First Program, Build and Run Companion
Build and run a complete C# invoice calculator with exact project files, culture-safe input and output, error handling, and eight executable checks. Includes worked transcripts and reproducible .NET 10 exercises.
18 pages · 95 KB · C# Language
- PDFFree
C# Console Design and Testing Companion
Build a three-project C# invoice application with a thin console boundary, reusable calculation library, and a standalone test harness. Work through parsing, rounding, validation, overflow, and a deliberate test failure with exact .NET 10 examples.
15 pages · 76 KB · C# Language
- PDFFree
C# Compiler Diagnostics and Build Confidence Companion
Diagnose and repair syntax, type, and nullable-reference problems with complete .NET 10 projects. Compare warning policies, inspect runtime validation, and check exact output streams and exit codes using worked compiler and port-validation examples.
16 pages · 92 KB · C# Language
- ArticleFree
Deferred Execution and Repeated Enumeration in LINQ to Objects
Learn when a LINQ to Objects query actually runs, why enumerating the same query twice repeats work, and how that differs from database query translation and execution.
C# Language
- NoteFree
C# Copies Values and References Differently
Learn how C# assignment behaves for value types and reference types, why copies can be independent or shared, and why memory location is a separate question.
C# Language
- ArticleFree
Working with bool, char, and string in Everyday C#
Learn how C# boolean, character, and string types behave in real code, including comparisons, text handling, and common pitfalls that matter in production.
C# Language
- ArticleFree
Generic Types and Generic Methods in C#
Learn how C# generics let you reuse algorithms and data structures without giving up compile-time type safety or resorting to casts.
C# Language
- ArticleFree
Choosing Between StringBuilder and String Concatenation in C#
Learn when plain concatenation, interpolation, or StringBuilder is the right tool for building text in C# based on workload, readability, and allocation behavior.
C# Language
- ArticleFree
Loop-Variable Capture Pitfalls in C# Lambdas and Callbacks
Learn why callbacks inside loops can all observe the same changing variable, how C# fixed foreach capture semantics, and how to write safe per-iteration closures in modern code.
C# Language
- ArticleFree
String Immutability in C#: Allocations, Sharing and Surprises
Learn why C# strings never change in place, how assignment shares references, and when string operations allocate a new result or reuse an existing instance.
C# Language
- ArticleFree
Generic Constraints in C#: Design Contracts for Type Parameters
Learn how C# generic constraints define the capabilities a type argument must provide, enabling safer APIs, better compiler checks, and clearer intent.
C# Language
- ArticleFree
Materialization with ToList: Snapshotting LINQ Results
Learn how ToList() forces immediate LINQ execution, captures a snapshot of results, and avoids repeated reevaluation when the source changes later.
C# Language