I tried googling this but I can't find an answer to this (hope it isn't just my bad searching skills). But what I currently have is this:
static void Main(string[] args)
{
while (xa == true)
{
switch (switchNum)
{
case 0:
Console.WriteLine("Text");
break;
case 1:
Console.WriteLine("Stuff");
break;
case 2:
Console.WriteLine("More Stuff");
break;
}
}
And what I want to know is how to change the switchNum when I press a key. Hopefully 3 different keys for each case.
EDIT: Clarification
So currently it will type out of the console like this:
Text
Text
Text
Text
Text
Text
And I want it to change to something else when I press a key e.g. "w"
Text
Text
Text
Text
//Press w here
Stuff
Stuff
Stuff
Stuff
//Pressing another key e.g. q
More Stuff
More Stuff
More Stuff
...
So what I don't know is how to receive different keys, and to keep the loop going (therefore, readkey() might not work).
Thanks in advance!