$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #542

Which programming language is this?

string label = shape switch
{
    Circle c => $"circle r={c.Radius}",
    Square { Side: > 10 } => "big square",
    _ => "unknown"
};

Answer: C#

A switch expression with property patterns like { Side: > 10 } and a $"" interpolated string is C#.
Play Programming Languages ▸