Hi everyone, I have this issue :
I have a really big switch statement (and I want eventually to add some cases in the future), it is a simple one looking like that :
switch (cardNo)
{
case 1:
//Do stuff
break;
case 2:
//Do stuff
break;
case 3:
//Do stuff
break;
case 4:
//Do stuff
break;
//AND SO ON......
}
I would simply like to iterate the int at each case, like that :
switch (cardNo)
{
int k = 0;
case k:
//Do stuff
break;
k++;
case k:
//Do stuff
break;
k++;
case k:
//Do stuff
break;
k++;
case k:
//Do stuff
break;
//AND SO ON......
}
So if I add a new case 3, I do not have to push each case from 4 to 100000⌠![]()
(I need to do that because this statement is linked with a txt fileâŚ)
Have you a solution ?
Thank you !