What's Pattern Matching in C# 8.0?by@miguel-bernard
1,299 reads
1,299 reads

What's Pattern Matching in C# 8.0?

by Miguel Bernard7mMarch 8th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Pattern matching in C# 8.0 is a new feature in the latest version of the language. The new switch is an expression and the old one is a statement. Every possible match must return a value of the same type. Pattern matching is super powerful and can be used to simplify complex logic while making it easier to read. We'll see how pattern matching makes the code clean and easy to read in a new application that has many business rules. The latest release of C# (8.0) has full support for pattern matching.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - What's Pattern Matching in C# 8.0?
Miguel Bernard HackerNoon profile picture
Miguel Bernard

Miguel Bernard

@miguel-bernard

Miguel is passionate about teaching, developers' communities and everything related to .Net.

Learn More
LEARN MORE ABOUT @MIGUEL-BERNARD'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Miguel Bernard HackerNoon profile picture
Miguel Bernard@miguel-bernard
Miguel is passionate about teaching, developers' communities and everything related to .Net.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite