C# Language
The language layer a senior must know cold. Type system, nullability, exception design, async internals (split across three files because the senior bar demands it), Span<T>/Memory<T> and ref struct, generics + variance, LINQ, expression trees, pattern matching, modern C# 13/14 features, source-gen serialization and regex, and resource management.
Topics (canonical order)
-
class/struct/record/record struct/ primary constructors / boxing / equality -
NRT annotations, flow analysis,
?/!, generic null states, common false positives -
Throw vs Result,
[StackTraceHidden],OperationCanceledExceptionvsTaskCanceledException, exception filters, custom hierarchies -
Propagation rules, linked tokens,
ThrowIfCancellationRequested, timeout tokens,[EnumeratorCancellation] -
DateTimevsDateTimeOffsetvsDateOnly/TimeOnly,TimeProviderfor testability, NodaTime trade-offs, DST/time-zone storage -
Channel<T>(bounded vs unbounded),IAsyncEnumerable<T>,await foreach, backpressure -
Interlocked,Volatile, memory model,ReaderWriterLockSlim,SemaphoreSlim,PriorityQueue<T> -
The compiler-generated state machine,
MoveNext,ExecutionContextcapture, async stack traces -
Async/Await — SyncContext & Deadlocks
SynchronizationContext,ConfigureAwait, sync-over-async, deadlock anatomy -
Async/Await — ValueTask & IAsyncEnumerable Perf
ValueTask, async I/O performance,IAsyncEnumerableperf characteristics -
Span<T>,Memory<T>,ref struct, C# 14 first-class Span,allows ref struct -
Constraints, covariance/contravariance, generic math (
INumber<T>), static abstracts in interfaces -
Deferred vs immediate, LINQ-to-Objects vs LINQ-to-Entities, .NET 9
CountBy/AggregateBy, allocation traps -
What they are, how EF Core uses them, building one by hand, compilation cost
-
Switch expressions, list/property patterns, records and
withexpressions -
Collection expressions,
paramscollections, extension members,fieldkeyword, primary constructors, partial constructors -
System.Text.Json — Serialization Deep
JsonSerializerContextsource-gen, polymorphism, custom converters, why Newtonsoft is legacy, perf -
[GeneratedRegex],SearchValues<T>,CompositeFormat -
IDisposable,IAsyncDisposable,usingdeclarations, finalizers,SafeHandle -
MethodInfo,Activator, cached delegates,Expression.Compile,DynamicMethod/IL, AOT/trim trade-offs -
Delegates, Events & Weak Events
Multicast, variance, the leak pattern, weak-event manager,
IObservable<T>/Channel<T>alternatives -
IEquatable<T>,GetHashCodecontract, records,IComparable<T>/IComparer<T>,StringComparer.Ordinal -
Operator Overloading & Generic Math
op_Implicit/op_Explicit,INumber<T>,IParsable<T>,ISpanFormattable,op_Checked -
decimalvsdouble, IEEE 754 traps,Half/BigInteger/Int128,checked/unchecked, currency rounding -
[LibraryImport]source-gen, blittable types,SafeHandle, function pointers,CsWin32generator -
Strings, Encoding & Interpolation
UTF-16/UTF-8, surrogate pairs,
[InterpolatedStringHandler],string.Create,Utf8.TryWrite,u8literals -
When
Span<T>isn't enough,fixedvsGCHandle,Unsafestatic class, function pointers -
ValueTuplevsTuple, named members,Deconstruct, pattern integration, when to switch to records
Why this order
Cancellation, datetime, channels, and concurrency primitives all come before the async/await internals because async-internals topics depend on understanding cancellation propagation, time abstractions, and the underlying primitives that drive continuations. The async section is split into three files because the state machine, sync-context behavior, and ValueTask performance characteristics each merit deep treatment that would be unfair to compress.
Cross-references
- Many topics here cross-link into Runtime & CLR for runtime mechanics (e.g., async state machines reference
ExecutionContextand threadpool internals). linq-deferred-execution.mdreferences EF Core — Querying & Projections for LINQ-to-Entities behavior.regex-and-searchvalues.mdcross-links into Source Generators & Analyzers.