relational pattern
A pattern that compares, like > 10.
Relational patterns (<, <=, >, >=) compare against a constant; and, or, and not combine patterns.
Examples
string band = temp switch { < 0 => "freezing", < 20 => "mild", _ => "hot" };
See also
A pattern that compares, like > 10.
Relational patterns (<, <=, >, >=) compare against a constant; and, or, and not combine patterns.
Examples
string band = temp switch { < 0 => "freezing", < 20 => "mild", _ => "hot" };
See also