Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
C# 14 Generics, Iteration & State Management Masterclass
New
6 students

C# 14 Generics, Iteration & State Management Masterclass

Master C# 14 generics, iterators, pattern matching, Lazy<T>, mapping and Option types for clean, type-safe .NET 10 code.
Created byACHRAF ER-RAYA
Last updated 10/2026
English

What you'll learn

  • Build high-performance, type-safe generic data structures & algorithms using C# 14.
  • Master custom yield iterators, deferred execution, and optimized state traversal.
  • Implement pattern matching and Option types to eliminate null reference errors.
  • Optimize application state using Lazy, ValueTuple, and fast object mappers.

Course content

7 sections • 12 lectures • 2h 36m total length
  • Building High-Performance Yield Iterators & State-Aware Collections in C# 1410:26
  • Building High-Performance Yield Iterators C# 14 (PART2)11:22

Requirements

  • Basic familiarity with C# fundamentals (variables, basic loops, and class structures).

Description

This course contains the use of artificial intelligence.

Master modern C# 14 features and transform legacy enterprise code into ultra-fast, maintainable, and type-safe backend systems.

As software applications scale, legacy codebase issues like NullReferenceExceptions, slow object mapping, memory-heavy iterators, and deeply nested logic statements cause performance bottlenecks and costly bug investigations. This course delivers battle-tested design patterns, memory optimization strategies, and functional C# 14 techniques used by senior software architects at top enterprise organizations.

You will step beyond basic C# syntax and master advanced state management, zero-allocation generics, yield-driven streaming iteration, thread-safe deferred initialization, and lock-free pattern matching architectures.

Who this course is for:

  • Mid-level C# .NET developers looking to level up to Senior Architect status

  • Software engineers transitioning to modern C# 14 from legacy .NET Framework codebases

  • Backend engineers building high-throughput microservices demanding low memory allocation

  • Tech leads wanting to establish clean, robust C# coding standards across their engineering teams

What you will learn:

  • Build custom stream-based iterators with yield return and C# 14 state evaluation

  • Implement generic type-safe repositories with advanced type constraints

  • Eliminate nested conditionals using relational, positional, and list pattern matching

  • Optimize resource allocation using thread-safe Lazy deferred initialization

  • Refactor out parameters into high-performance, stack-allocated ValueTuples

  • Construct zero-reflection object mappers leveraging generic type initialization

  • Replace dangerous null checks with functional Option and Null Object design patterns

  • Master thread-safe state management across asynchronous C# applications

Requirements:

  • Experience with basic C# syntax and Object-Oriented Programming (OOP) concepts

  • Visual Studio 2022 or JetBrains Rider installed with .NET 9 / C# 14 environment

Final Project Description: You will refactor an unstable, low-performance legacy e-commerce processing pipeline into a high-throughput, fault-tolerant state engine. The final project requires implementing custom yield iterators for batch processing, building a zero-reflection generic mapper for DTO conversions, eliminating null pointer exceptions using a custom Option type, and managing state transitions using modern C# 14 pattern matching.

Who this course is for:

  • C# developers looking to master high-performance generics, state control, and modern modern C# 14 patterns.