c# the power of pattern matching and code simplication


Consider the following code :-




And then with the power of pattern matching, it gets simplified into :-





Walla!!

Comments