string s = "0";
switch (s)
{
case [var c] when c is >= '0' and <= '9':
Console.WriteLine("break");
break;
default: break;
}
Created
December 20, 2022 21:59
-
-
Save scarletquasar/52e71655507ea49b10b9ce580581f208 to your computer and use it in GitHub Desktop.
Switch case with conditions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment