Under the Hood of C# Pattern Matching
M7 May 25, 2023, 3:20 PM - 4:10 PM
Partner Software Engineer - Microsoft
Pattern matching is a recent addition to the C# language with new features being added in every release. Come and see how pattern matching works under the hood, generating efficient code to match on objects by type, by shape, and recursively. In this talk, we'll start by looking at simple patterns in "is" expressions and "switch" expressions, build gradually more complex patterns, and peruse the Roslyn compiler code to see how patterns get compiled. We'll finish up our excursion by having a look at the new list and slice patterns in C# 11.0.