What is pattern matching in C#?

  1. Regular expressions
  2. String pattern search
  3. File pattern matching
  4. Technique for checking value shapes and extracting data

Explanation

Pattern matching allows you to test if a value has a certain shape and extract information from the value when it does.