Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 24, 2022
Embed
What would you like to do?
public static int CheckSwitch(int[] values)
=> values switch
{
[1, 2, .., 10] => 1,
[1, 2] => 2,
[1, _] => 3,
[1, ..] => 4,
[..] => 50
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment