variable chapter c# switch statement
why c# switch statement, non-static used churned cases, wholly announce initial case?
for example, following throws blunder "a internal non-static named 'variable' already tangible scope".
switch (type)
{
box type.a:
twine non-static = "x";
break;
box type.b:
twine non-static = "y";
break;
}
however, per logic, initial chapter should strike form type.b
. variables within switch matter exist unparalleled scope, created/allocated before any explanation processed?
Comments
Post a Comment