Рет қаралды 2,783
Need to analyse lists of arbitrary length? C# 11 gives us list pattern matching.
Source code available at: github.com/Jas...
Topics include:
Discarding with '_'
Switch expressions
Extracting data with a declaration pattern
Matching against Lists and arrays
Capturing ranges with '..'
Combining list and relational patterns
And did anyone spot the 'deliberate' mistake that the video title says C# 8 not C# 11? Don't know what I was thinking of.