A three-day deep-dive for experienced .NET engineers into advanced C# 14 language features, performance patterns, source generators, async/parallel workloads, and .NET 10 runtime improvements — with hands-on benchmarking and diagnostics labs.
Advanced C# and .NET 10 (C# 14)
Duration: 3 days
Hands-on workshop for experienced .NET engineers to master modern C# (through C# 14) and .NET 10. Focus on advanced language constructs, performance patterns, runtime features, and building/consuming source generators.
Audience
- Senior C#/.NET developers and architects
- Teams upgrading to .NET 10 and adopting new C# 14 capabilities
- Engineers building high-performance services, libraries, or tooling
Prerequisites
- Strong C#/.NET experience; comfortable with generics, async/await, LINQ
- .NET 8/9/10 SDKs, Visual Studio/VS Code
- Familiarity with unit testing and profiling basics
Learning Goals
- Apply advanced C# constructs for correctness, clarity, and performance
- Use new C# 14 features effectively and safely
- Build and consume source generators, analyzers, and incremental pipelines
- Optimize allocations, memory layout, and async/parallel workloads
- Integrate modern .NET 10 runtime libraries, hosting, and diagnostics
Agenda
- Modern C# foundations refresh
- Spans, ref structs,
reffields - Pattern matching updates; property/switch patterns
- Records, required members, collection expressions
- Spans, ref structs,
- C# 14 highlights
- Primary constructors (classes/structs)
- Collection expressions in more contexts;
paramscollections - Interceptors (if available),
usingaliases, readonly ref extensions - Default parameters for lambdas; exhaustiveness improvements
- Advanced async and concurrency
ValueTask, cancellation, timeouts;AsyncLocalcautions- Async streams;
Parallel.ForEachAsync, Channels - Source-generated async APIs; throughput vs latency considerations
- Performance and memory
- stackalloc/spans/pools;
Memory<T>/ReadOnlyMemory<T> Unsafewith guardrails; SIMD intrinsics; array poolingCollectionsMarshal,StringBuildervsstring.Create, UTF-8 literals/parsers
- stackalloc/spans/pools;
- Source generators and analyzers
- Roslyn architecture; incremental pipelines (syntax/semantic)
- Caching, incremental steps, avoiding allocations
- Authoring and packaging generators; consuming in apps/libs
- .NET 10 runtime/platform updates
- BCL additions; JIT/GC improvements
- Trimming/AOT readiness; native AOT constraints
- Hosting updates; logging/metrics/tracing (OpenTelemetry,
dotnet monitor, EventPipe,dotnet-counters)
- Diagnostics and testing
- Unit/integration tests for modern C# features
- Testing source generators; analyzer test harness
- Benchmarking (BenchmarkDotNet), flame graphs, perf traps (boxing, sync-over-async, hidden allocations)
Hands-on Labs (examples)
- Refactor to primary constructors and collection expressions; verify readability and allocations
- Implement a custom incremental source generator and analyzer; add unit tests
- Add a source-generated serializer or client proxy and measure startup/runtime impact
- Optimize a CPU-bound routine with SIMD and spans; benchmark before/after
- Build a bounded Channel-based pipeline and trace with OpenTelemetry via the Aspire dashboard
Outcomes
Participants leave able to design and ship advanced C# 14/.NET 10 codebases, leverage source generators safely, diagnose performance issues, and apply modern language/runtime features for maintainable, high-performance solutions.