I have a question about switches in C#. I have a basic switch, three cases and a default, as you can see here:
string firstSwitch = Console.ReadLine().ToLower();
switch (firstSwitch)
{
case "goodbye":
Console.WriteLine("Hello, Goodbye");
break;
case "gandalf":
Console.WriteLine("YOU SHALL NOT PASS!");
break;
case "skyrim":
Console.WriteLine("I used to be an adventurer like you, then I took an arrow to the knee.");
break;
default:
Console.WriteLine("The Force is strong with this one.");
break;
Now I want to add another case that will respond with a random case output that was previously added. For example:
case "giveRandom":
//Code that returns the value for Case 0, case 1, or case 2,//
break;
Thanks in advance for your help guys.