Patterns - C# reference | Microsoft Docs
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns
Apr 27, 2022 · In a var pattern, the type of a declared variable is the compile-time type of the expression that is matched against the pattern. For more information, see the Var pattern section of the feature proposal note. Discard pattern. Beginning with C# 8.0, you use a discard pattern _ to match any expression, including null, as the following example shows:
DA: 85 PA: 74 MOZ Rank: 43