0

Only number can be write in case?

5th Mar 2020, 7:04 AM
monsterfire1357
monsterfire1357 - avatar
3 Respuestas
+ 3
String and Enum can also be used as evaluation subject for `switch`. For the next time, please try to search the forum for possible similar thread topics. It helps in reducing duplicate questions 👍 https://www.csharp-examples.net/switch (Edit) I didn't see there was already answers when posting, refresh the page then I see 😆
5th Mar 2020, 8:06 AM
Ipang
+ 3
Chars too are accepted. char c = 'a'; switch(c){ case 'a': Console.WriteLine("hi"); break; }
5th Mar 2020, 8:09 AM
Avinesh
Avinesh - avatar