ICYMI C# 8 New Features: Simplify If Statements with Property Pattern Matching

added by DotNetKicks
2/10/2021 3:29:22 AM

633 Views

This is part 3 in a series of articles. In the first part of this series we looked at switch expressions. When making use of switch expressions, C# 8 also introduced the concept of property pattern matching. This enables you to match on one or more items of an object and helps to simplify multiple if..else if statements into a more concise form.


0 comments