Pattern matching (greatly expanded in recent C# versions) lets you test a value's shape, type, and properties concisely, and extract data — making complex conditional logic far cleaner than nested if-else chains. It's used with switch expressions, is, and more.
Type patterns and the is operator
(obj s)
Console.WriteLine(s.Length);
(obj n > )
Console.WriteLine();
