for (int i = 0; i < 100; i++)
{
switch (i)
{
case int n when n < 50:
Debug.Log("1");
break;
case int n when n < 100:
Debug.Log("2");
break;
}
}
I would expect it to print 1 until it gets to 50, and then start printing 2. However, this always prints 1 no matter what, and also does not throw any compiler errors that range switch statements are unsupported
Using code like this
I would expect it to print 1 until it gets to 50, and then start printing 2. However, this always prints 1 no matter what, and also does not throw any compiler errors that range switch statements are unsupported