~/talk

What C# Programmers Need to Know About Pattern Matching

Talkat NDC London 2018 · 2018-01-15..01-19· [python]
links:none on file
slides:none on file

C# 7 pattern matching cuts common boilerplate by combining selection, assignment and evaluation into one construct: it replaces is/as casts and nested ifs with type pattern cases, adds guard expressions for extra checks, and introduces the discard operator to ignore matched values. Examples include simplifying WPF control-reset code, rewriting FizzBuzz using tuples, and a Roslyn-based search tool that finds EF Core sites where null checks vanish; unit tests still pass and performance impact remains to be measured.

AI-written summary · about

  1. 0:00Start
  2. 2:33What is Pattern Matching?
  3. 18:35Real Examples
  4. 32:37Other Languages
  5. 48:47When should you use pattern matching?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.