Overview
Coursera Spring Sale
40% Off Coursera Plus Annual!
Grab it
Explore pattern-based programming in C# through this conference talk that demonstrates how the Roslyn compiler recognizes specific type shapes to enable powerful language features without requiring explicit interface implementation. Discover how to leverage duck typing principles in C#'s strongly-typed environment by implementing patterns that allow types to work seamlessly with foreach statements, await operators, tuple-like deconstruction, implicit Index and Range support, and collection initializers. Learn through live coding demonstrations how to design reusable types that provide convenient and idiomatic consumption in both libraries and applications, understanding that if a type behaves like it should support a feature, the compiler will often allow it to do so based on its structural pattern rather than inheritance hierarchies.
Syllabus
Pattern-based C#: if it quacks like a duck… - Eva Ditzelmüller & Stefan Pölz - NDC Oslo 2025
Taught by
NDC Conferences