C# Pattern Matching switch - 28.01.26 - ErcanOPAK return obj switch { null => 0, _ => 1 }; Why it mattersClear intent, fewer bugs. Related posts:How to select distinct rows in a datatable in C#C#: Professional Formatting with Advanced String InterpolationC#: Use Generic Math for Mathematical Algorithms on Any Numeric Type Post Views: 6