Topics
Async Await Deep Dive
Use this sheet to unpack what happens when the compiler rewrites an async method and how to keep code responsive under load.
Base Keyword
In object-oriented programming (especially in C#), the keyword base is used inside a derived class to refer to its immediate parent (base) class.
Chapter 01 Survival Of The Sharpest
Purpose of this chapter: set context for why modern C# looks the way it does, and which evolutionary themes matter in real codebases.
Chapter 02 Csharp 2 Generics
Purpose of this chapter: understand the C# 2 features that made âmodern C#â possible: generics, Nullable
Chapter 03 Csharp 3 Linq
Purpose of this chapter: understand the collection of C# 3 language features that (together) enable LINQ to be expressive and practical: implicit typing, lambdas, extension methods, query syntax, etc.
Chapter 04 Csharp 4 Improving Interoperability
Purpose of this chapter: understand the C# 4 features that make interop and API consumption easier (dynamic, optional/named arguments), and learn generic variance (a key type-system concept used heavily by BCL interfaces).
Chapter 05 Writing Asynchronous Code
Purpose of this chapter: build a correct mental model for async/await so you can reason about control flow, exceptions, cancellation, context capture, and performance tradeoffs in production services.
Chapter 06 Async Implementation
Purpose of this chapter: understand what the compiler generates for async/await so you can reason about performance, debugging, and âweirdâ control-flow issues (especially around try/finally, contexts, and custom awaitables).
Chapter 07 Csharp 5 Bonus Features
Purpose of this chapter: cover the âextraâ C# 5 features beyond async/await that show up in real code and interviews: foreach closure capture behavior and caller info attributes.
Chapter 08 Super Sleek Properties And Expression Bodied Members
Purpose of this chapter: learn modern property improvements (read-only auto-props, initializers, struct behavior) and when expression-bodied members improve clarity vs when they harm readability.
Chapter 09 Stringy Features
Purpose of this chapter: get fluent with modern âstring-facingâ features: interpolated strings (including formatting and culture) and nameof for refactor-safe identifiers.
Chapter 10 Smorgasbord Of Features For Concise Code
Purpose of this chapter: learn several features that improve day-to-day readability by removing noise: using static, initializer enhancements, the null-conditional operator, and exception filters.
Chapter 11 Composition Using Tuples
Purpose of this chapter: become fluent with tuples as a lightweight composition tool, understand the difference between System.ValueTuple and System.Tuple, and know when not to use tuples (especially in public APIs).
Chapter 12 Deconstruction And Pattern Matching
Purpose of this chapter: get comfortable with deconstruction (tuples and custom Deconstruct) and pattern matching (type/constant/var patterns, is, and switch) so you can write clearer branching logic and explain compiler behavior inâŚ
Chapter 13 Improving Efficiency With More Pass By Reference
Purpose of this chapter: understand modern by-ref features (ref locals/returns, in parameters, readonly structs, ref-like structs like Span
Chapter 14 Concise Code In Csharp 7
Purpose of this chapter: cover the âsmall but everywhereâ features in C# 7.x that reduce boilerplate while keeping code explicit: local functions, out vars, numeric literal improvements, throw expressions, default literals, namedâŚ
Chapter 15 Csharp 8 And Beyond
Purpose of this chapter: understand the C# 8 feature set (and nearby future items) that meaningfully change how we write safe, expressive code: nullable reference types, switch expressions and richer patterns, ranges/indexes, and deeperâŚ
CLR & Garbage Collector (GC)
The CLR's generational GC keeps Gen0/Gen1/Gen2 on the Small Object Heap (compacted) and routes âĽ85 KB allocations to the Large Object Heap (not compacted by default), with Server GC the throughput-tuned default for ASP.NET services. TheâŚ
CLR & Garbage Collector (GC) Practical Example
A worked example of allocation-free parsing â a market-data tick stream parsed with ReadOnlySpan
Dependency Injection Lifetimes
đ Tip: Never capture a scoped service inside a singletonâinject IServiceScopeFactory instead and create a scope per operation.
FIFO Queues In .NET
âď¸ Threading Tip: Prefer Channel
Forcing Garbage Collection
GC.Collect() and friends force a full, blocking collection across all generations â useful in benchmark setup or memory-snapshot tooling, but almost never in production hot paths, where they spike latency and defeat the GC's ownâŚ
IDisposable Patterns
IDisposable is the .NET contract for releasing unmanaged resources (sockets, file handles, DB connections, timers) deterministically, paired with using/await using so cleanup runs even on exceptions. The senior-engineer details areâŚ
Nameof Keyword
The nameof operator returns the simple (unqualified) string name of a variable, type, or member at compile time. It's a small but powerful tool for writing safer, refactor-friendly code.
NET Generational Garbage Collection (GC) Deep Dive
Study notes and examples
RabbitMQ
RabbitMQ is an AMQP broker built for command and work queues with rich routing (direct, topic, fanout, headers), per-message acknowledgements, and dead-letter exchanges. Senior engineers reach for it over Kafka when they need flexibleâŚ
Reflection Overview
đ Interview Angle: Be ready to explain how ActivatorUtilities or JsonSerializer leverage reflection and how source generators reduce reflection cost in .NET 5+.
Server Vs Workstation GC
Server GC and Workstation GC are the two .NET garbage collector flavors: Server GC runs one parallel GC thread per core with larger heap segments to maximize throughput on multi-core hosts (the ASP.NET Core default), while WorkstationâŚ
Sorted Collections Interview Notes
đ§ Practice Prompt: Explain how youâd pick between SortedList and SortedDictionary for a price ladder updated multiple times per second.
Sorting Algorithms
Use this sheet to describe trade-offs quickly and reference C# examples when whiteboarding or coding live.
Struct Vs Class When To Use Which
| Feature | struct | class | | -------------------------- |âŚ
Types
Choosing the right kind of type affects memory layout, equality semantics, mutability, and API contracts. Use these rules of thumb when designing models and DTOs: