using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Assignment2 { class Program { static void Main(string[] args) {
The offending code are your case statements. a is an int. Your case statements all use strings. Simply remove the quotes around the numbers:
a
int
string
switch(a) { case 1: // some code break; case 2: // some code break; // rest of cases }