I have to evaluate many conditions. In my case, I have to do something like this:
switch(id)
{
case 5:
// switch some other cases here
case 6:
Switch statements aren't bad practice. Nested switch statements might be messy to look at.
Perhaps think about embedding the nested switch statement in another method to improve clarity.
I'd call a function that was specific to case 5, then have the switch case in that function. For example :
switch(id)
{
case 5:
FunctionFiveSpecific(id);
case 6:
// set some value
...
}
The function specific for case 5 :
private void FunctionFiveSpecific(id)
{
// other switch in here
}