C
Clive Dixon
If C# (VS 2003) allows switch on null, why does it not allow "goto case
null":
switch (someString)
{
case "BlahBlahBlah":
break;
case null:
break;
default:
goto case null;
}
Compiler error:
"No such label 'case 0:' within the scope of the goto statement"
Is this an omission or is there some good reason for disallowing it?
null":
switch (someString)
{
case "BlahBlahBlah":
break;
case null:
break;
default:
goto case null;
}
Compiler error:
"No such label 'case 0:' within the scope of the goto statement"
Is this an omission or is there some good reason for disallowing it?