C# Roadmap

Open a topic for notes and resources. Mark it done when you are ready to move on.

28 stages · 112 topics 0% done
C#
✓ System.Reflection Architecture
✓ Custom Attributes & AttributeUsage
✓ Foundations
✓ Dynamic Invocation & Performance
✓ Reflection Emit & Dynamic Assemblies
✓ Core Concepts
✓ Source Generators (Roslyn)
✓ Expression Trees
✓ Unmanaged Callers & Function Pointers
✓ Task & ValueTask Semantics
✓ Intermediate Skills
✓ ConfigureAwait & Context
✓ Async Streams (IAsyncEnumerable<T>)
✓ Advanced Topics
✓ Channels (System.Threading.Channels)
✓ AsyncValueTask Pooling & IValueTaskSource
✓ Task vs Thread Differences
✓ SynchronizationContext & AsyncLocal
✓ Expert Level
✓ IEnumerable & IQueryable
✓ LINQ Method Chain & Deferred Execution
✓ Mastery
✓ LINQ Provider Implementation
✓ PLINQ for Parallel Queries
✓ LINQ to SQL/EF Translation
✓ Custom LINQ Operators
✓ Ecosystem
✓ Expression Tree Optimization
✓ Generic Type System
✓ Architecture
✓ Constraints (where T : struct, class, new())
✓ Covariance & Contravariance (in/out)
✓ History: Reified vs Type Erasure
✓ Generic Method Type Inference
✓ Optimization
✓ Static Fields in Generic Types
✓ Generic Math (INumber<T>, .NET 7)
✓ Deployment
✓ Span<T> & Memory<T>
✓ Stackalloc & Span Safety
✓ Unsafe & Pointer Operations
✓ MemoryMarshal & Casting
✓ Phase 11
✓ Buffer Management with ArrayPool<T>
✓ String Interning & String.Create
✓ Phase 12
✓ GC Root Generation & Object Graph
✓ Syntax Tree & Syntax Nodes
✓ Semantic Model & Symbols
✓ Analyzer (DiagnosticAnalyzer)
✓ Phase 13
✓ Code Fix Provider
✓ Syntax Transformation
✓ Phase 14
✓ CSharpCompilation & Emit
✓ Scripting API (CSharpScript)
✓ P/Invoke Declaration & Marshalling
✓ Struct Layout (Sequential, Explicit)
✓ Phase 15
✓ Callback Delegates (UnmanagedFunctionPointer)
✓ COM Interop & COM Callable Wrapper
✓ Phase 16
✓ WinRT Interop
✓ C++/CLI Bridge
✓ Native Memory (Marshal.AllocHGlobal)
✓ ThreadPool Internals
✓ Phase 17
✓ TaskScheduler & Custom Scheduling
✓ Parallel.For/ForEach Patterns
✓ Phase 18
✓ Barrier & CountdownEvent
✓ ReaderWriterLockSlim
✓ SpinLock & SpinWait
✓ Dataflow (ActionBlock, TransformBlock)
✓ Phase 19
✓ Switch Expressions (C# 8+)
✓ Property & Tuple Patterns
✓ Phase 20
✓ Positional Pattern (Deconstruct)
✓ List Patterns (C# 11)
✓ Relational Patterns (<, >, and, or)
✓ Pattern Combinators
✓ Phase 21
✓ Pattern Matching in Recursive Types
✓ Incremental Generators (IIncrementalGenerator)
✓ Phase 22
✓ Syntax Receiver & Pipeline
✓ Emitting Source with SourceText
✓ Registering Outputs
✓ Debugging Source Generators
✓ Phase 23
✓ Source Gen Safety & Avoidance
✓ Real-World: System.Text.Json Source Gen
✓ Phase 24
✓ fixed Statement & Pinning
✓ Address-of & Pointer Types
✓ stackalloc & Span
✓ MethodImplOptions.AggressiveInlining
✓ Phase 25
✓ SuppressGCTransition
✓ SkipLocalsInit
✓ Phase 26
✓ NativeAOT Unsafe Operations
✓ BenchmarkDotNet Methodology
✓ GC Overhead & Collection Modes
✓ Struct vs Class Performance
✓ Phase 27
✓ Array Pooling & Rent Patterns
✓ ValueTask & Avoiding Allocations
✓ Phase 28
✓ StringBuilder vs String Concatenation
✓ Hardware Intrinsics (SIMD)
Text version of this roadmap

1. Foundations

  • System.Reflection Architecture
  • Custom Attributes & AttributeUsage
  • Dynamic Invocation & Performance: Performance considerations for dynamic invocation & performance in Csharp significantly impact application behavior. Understanding optimization strategies helps avoid common pitfalls and improve runtime characteristics.

2. Core Concepts

  • Reflection Emit & Dynamic Assemblies: Reflection in C# provides runtime type discovery. You can inspect assemblies, modules, types, methods, properties, and fields. System.Reflection enables dynamic activation, method invocation, and member access without compile-time type knowledge.
  • Source Generators (Roslyn)
  • Expression Trees

3. Intermediate Skills

  • Unmanaged Callers & Function Pointers
  • Task & ValueTask Semantics
  • ConfigureAwait & Context

4. Advanced Topics

  • Async Streams (IAsyncEnumerable<T>)
  • Channels (System.Threading.Channels)
  • AsyncValueTask Pooling & IValueTaskSource

5. Expert Level

  • Task vs Thread Differences
  • SynchronizationContext & AsyncLocal
  • IEnumerable & IQueryable

6. Mastery

  • LINQ Method Chain & Deferred Execution
  • LINQ Provider Implementation: The linq provider implementation pattern in Csharp provides a structured approach to handling LINQ Internals. Understanding the implementation details helps write more robust and maintainable code.
  • PLINQ for Parallel Queries

7. Ecosystem

  • LINQ to SQL/EF Translation
  • Custom LINQ Operators
  • Expression Tree Optimization

8. Architecture

  • Generic Type System
  • Constraints (where T : struct, class, new())
  • Covariance & Contravariance (in/out)

9. Optimization

  • History: Reified vs Type Erasure
  • Generic Method Type Inference
  • Static Fields in Generic Types

10. Deployment

  • Generic Math (INumber<T>, .NET 7)
  • Span<T> & Memory<T>
  • Stackalloc & Span Safety

11. Phase 11

  • Unsafe & Pointer Operations
  • MemoryMarshal & Casting
  • Buffer Management with ArrayPool<T>

12. Phase 12

  • String Interning & String.Create
  • GC Root Generation & Object Graph
  • Syntax Tree & Syntax Nodes

13. Phase 13

  • Semantic Model & Symbols
  • Analyzer (DiagnosticAnalyzer)
  • Code Fix Provider

14. Phase 14

  • Syntax Transformation
  • CSharpCompilation & Emit
  • Scripting API (CSharpScript)

15. Phase 15

  • P/Invoke Declaration & Marshalling
  • Struct Layout (Sequential, Explicit)
  • Callback Delegates (UnmanagedFunctionPointer)

16. Phase 16

  • COM Interop & COM Callable Wrapper
  • WinRT Interop
  • C++/CLI Bridge

17. Phase 17

  • Native Memory (Marshal.AllocHGlobal)
  • ThreadPool Internals: The internal architecture of threadpool internals in Csharp reveals how the runtime handles Threading & Tasks. This knowledge enables more informed design decisions and debugging.
  • TaskScheduler & Custom Scheduling

18. Phase 18

  • Parallel.For/ForEach Patterns: Various threading & tasks patterns emerge when working with parallel.for/foreach patterns in Csharp. These patterns provide reusable solutions to common programming challenges.
  • Barrier & CountdownEvent
  • ReaderWriterLockSlim

19. Phase 19

  • SpinLock & SpinWait
  • Dataflow (ActionBlock, TransformBlock)
  • Switch Expressions (C# 8+)

20. Phase 20

  • Property & Tuple Patterns: Various pattern matching patterns emerge when working with property & tuple patterns in Csharp. These patterns provide reusable solutions to common programming challenges.
  • Positional Pattern (Deconstruct)
  • List Patterns (C# 11): Various pattern matching patterns emerge when working with list patterns (c# 11) in Csharp. These patterns provide reusable solutions to common programming challenges.

21. Phase 21

  • Relational Patterns (<, >, and, or): Various pattern matching patterns emerge when working with relational patterns (<, >, and, or) in Csharp. These patterns provide reusable solutions to common programming challenges.
  • Pattern Combinators
  • Pattern Matching in Recursive Types

22. Phase 22

  • Incremental Generators (IIncrementalGenerator)
  • Syntax Receiver & Pipeline
  • Emitting Source with SourceText

23. Phase 23

  • Registering Outputs
  • Debugging Source Generators
  • Source Gen Safety & Avoidance

24. Phase 24

  • Real-World: System.Text.Json Source Gen
  • fixed Statement & Pinning
  • Address-of & Pointer Types

25. Phase 25

  • stackalloc & Span
  • MethodImplOptions.AggressiveInlining
  • SuppressGCTransition

26. Phase 26

  • SkipLocalsInit
  • NativeAOT Unsafe Operations
  • BenchmarkDotNet Methodology

27. Phase 27

  • GC Overhead & Collection Modes
  • Struct vs Class Performance: Performance considerations for struct vs class performance in Csharp significantly impact application behavior. Understanding optimization strategies helps avoid common pitfalls and improve runtime characteristics.
  • Array Pooling & Rent Patterns: Various performance patterns emerge when working with array pooling & rent patterns in Csharp. These patterns provide reusable solutions to common programming challenges.

28. Phase 28

  • ValueTask & Avoiding Allocations
  • StringBuilder vs String Concatenation
  • Hardware Intrinsics (SIMD)