Skip to content
Quiz · Enums, records and patterns · lesson 8 of 8

Quiz — the first matching arm

What does the program print (lines separated by spaces)?

C#
Console.WriteLine(Label(10));
Console.WriteLine(Label(50));

string Label(int n) => n switch
{
    > 10 => "big",
    > 0 => "positive",
    _ => "other",
};