Pattern Matching
2 sectionsRapid overview
Pattern Matching
TL;DR
A pattern is a test you apply to a value: "is it a Circle?", "is it null?", "is it between 0 and 100?", "does it have a Country of "CY"?". C# lets you use patterns in three places: the is expression (if (shape is Circle c)), the switch stat…
Read →How it works
Q: What are the three places you can use a pattern in C#?
Read →