Code:
int i;
char c;
while(true)
{
i = Console.Read();
if (i!=1)
{
c = (char) i;
switch(c)
{
}
}
}
Obviously inside the switch statement I'm going to have case statements like
Code:
case 'z': // do something; break;
but then there's the easily solved problem of case sensitivity. I have two options:
1) Is there a char equivalent of String.toLower()
2) It's been a while since I did this and my book does not explicitly clarify. In the following code, would my_function() execute regardless of the case of z/Z:
Code:
case 'z': case 'Z': my_function; break;
Thanks.