Core C#

Study Core C#

Language fundamentals, LINQ, async/await, records

Topics

Async Await Deep Dive

Senior

Use this sheet to unpack what happens when the compiler rewrites an async method and how to keep code responsive under load.

Base Keyword

Foundational

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

Foundational

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

Mid-level

Purpose of this chapter: understand the C# 2 features that made “modern C#” possible: generics, Nullable, better delegate syntax (anonymous methods), and iterators (yield).

Chapter 03 Csharp 3 Linq

Mid-level

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

Mid-level

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

Mid-level

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

Senior

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

Mid-level

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

Foundational

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

Foundational

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

Foundational

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

Mid-level

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

Mid-level

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

Senior

Purpose of this chapter: understand modern by-ref features (ref locals/returns, in parameters, readonly structs, ref-like structs like Span) so you can reason about performance and correctness without introducing unsafe bugs.

Chapter 14 Concise Code In Csharp 7

Foundational

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

Mid-level

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)

Senior

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

Senior

A worked example of allocation-free parsing — a market-data tick stream parsed with ReadOnlySpan slicing, Utf8Parser for numeric fields, and ArrayPool for buffer reuse, leaving at most one tiny string allocation per line.…

Dependency Injection Lifetimes

Mid-level

🔐 Tip: Never capture a scoped service inside a singleton—inject IServiceScopeFactory instead and create a scope per operation.

FIFO Queues In .NET

Foundational

⚙️ Threading Tip: Prefer Channel or System.Threading.Channels when you need async waiting rather than spin-checking a Queue.

Forcing Garbage Collection

Senior

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

Senior

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

Foundational

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

Senior

Study notes and examples

RabbitMQ

Senior

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

Mid-level

🔍 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

Senior

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

Mid-level

🧠 Practice Prompt: Explain how you’d pick between SortedList and SortedDictionary for a price ladder updated multiple times per second.

Sorting Algorithms

Mid-level

Use this sheet to describe trade-offs quickly and reference C# examples when whiteboarding or coding live.

Struct Vs Class When To Use Which

Mid-level

| Feature | struct | class | | -------------------------- |…

Types

Mid-level

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: