I hear that there are many ways to clean a code and make it perform quicker. Can you help me clear the code below. I have a lot of coding on my program that looks like the code below. I'm still a beginner at C#
case "jarvis":
if (ranNum == 1) { QEvent = ""; JARVIS.Speak("Yes sir"); }
else if (ranNum == 2) { QEvent = ""; JARVIS.Speak("Yes, whats up?"); }
else if (ranNum == 3) { QEvent = ""; JARVIS.Speak("Yes, I'm here"); }
else if (ranNum == 4) { QEvent = ""; JARVIS.Speak("I'm here"); }
else if (ranNum == 5) { QEvent = ""; JARVIS.Speak("go head sir, "); }
else if (ranNum > 5) { QEvent = ""; JARVIS.Speak("I'm listening"); }
break;