How to Use Property Patterns in C#
An if chain that checks order.Quantity == 0, then order.Quantity > 10, then order.Price >= 20 repeats the object's name on every line. A property pattern says the same thing once per case, inside a switch expression or an is check, and the compiler warns you about cases that can never be reached.
