- Course
C# 14 Generics, Iteration, and State Management
Backend code shouldn't repeat itself. This course will teach you how to apply C# 14's generics, custom iterators, pattern matching, and Option types to remove boilerplate and write cleaner, reusable, and type-safe, null-safe code.
- Course
C# 14 Generics, Iteration, and State Management
Backend code shouldn't repeat itself. This course will teach you how to apply C# 14's generics, custom iterators, pattern matching, and Option types to remove boilerplate and write cleaner, reusable, and type-safe, null-safe code.
Get started today
Access this course and other top-rated tech content with one of our business plans.
Try this course for free
Access this course and other top-rated tech content with one of our individual plans.
This course is included in the libraries shown below:
- Core Tech
What you'll learn
Real-world backend code is full of repeated patterns: helper methods that differ only by type, nested loops with awkward break-out logic, tangled state-checking switch statements, and defensive null checks scattered through every layer. In this course, C# 14 Generics, Iteration, and State Management, you'll gain the ability to apply C#'s advanced language features to eliminate that boilerplate at the algorithm and class level. First, you'll explore advanced iteration techniques and generic algorithms with constraints, replacing duplicated code and clumsy nested loops with reusable, type-safe building blocks. Next, you'll discover how to model state and control flow concisely with pattern matching, switch expressions, and property and positional patterns, and how to optimize objects with Lazy, ValueTuple, and clean object-to-object mapping using C# 14 extension members. Finally, you'll learn how to eliminate null-reference risks using the Null Object pattern and a custom Option type, replacing defensive null checks with safer, more expressive code. When you're finished with this course, you'll have the skills and knowledge of C# 14's advanced features needed to write more reusable, expressive, and null-safe code in your everyday backend work.