Web
Analytics
C# 9.0 new pattern matching feature | Angular | ASP.NET Tutorials

For Consultation : +91 9887575540

Stay Connected :

C# 9.0 new pattern matching feature

What is Pattern Matching

  • checks if a value has a certain shape.
  • C# 9.0 Introduce relational patterns like >,<,>=,<=,not, and, or etc.

if (obj is Vendor{ YearOfBirth: >= 1983} VendorDOB1983) {

// Use the VendorDOB1983 variable here }

 

Select your currency
Open chat
Powered by