C# 7 – Switch Statement with pattern matching

One of the new feature of C# 7 is an improved version of the switch statement that now support pattern matching.

Have a look at this video that explore how to refactor a series of if using the new switch statement with pattern matching.

 

Permanent link to this article: https://www.productivecsharp.com/2017/05/c-7-switch-statement-pattern-matching/


Warning: in_array() expects parameter 2 to be array, null given in /home/andreaa9/public_html/wp-content/themes/graphene/inc/plugins.php on line 92
>