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