Multiple cases in a switch

Is there a more efficient way of addressing multiple cases without doing each of them individually?

for example instead of doing something like:

case ‘a’:

console.writeline(“test”);

break;

can you do something like:

case ‘a’, ‘e’, ‘i’, ‘o’, ‘u’:

Console.WriteLine(“this is just a test”);

break;

submitted by /u/Kaibur02
[link] [comments]

Leave a Reply