What is pattern matching in C#?
- Technique for checking value shapes and extracting data
- String pattern search
- File pattern matching
- Regular expressions
Explanation
Pattern matching allows you to test if a value has a certain shape and extract information from the value when it does.