3 ms·
Exactly. Here is an overview of switch expressions for c#, for many cases you can replace if/else if/else with those. The pattern matching is very powerful too:
by andix 4y ago
Exactly. Here is an overview of switch expressions for c#, for many cases you can replace if/else if/else with those. The pattern matching is very powerful too:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/switch-expression https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...