79503838

Date: 2025-03-12 14:09:07
Score: 1.5
Natty:
Report link

since C# 7, the next is possible:

object greeting = "Hello, World!";

if (greeting is string message)
{
    Console.WriteLine(message.ToLower());  // Output: hello, world!
}

see more examples here: https://medium.com/@nirajranasinghe/pattern-matching-in-c-fcee69929776#:~:text=Understanding%20Pattern%20Matching%20in%20C%23,var%2C%20List%20and%20discard%20patterns.

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
Posted by: Nikita