I want to reverse the code inside switch block rather doing it my self (it seems to make no sense to me) ex:
{ string name = Console.ReadLine();
string s = null;
for (int i = 0; i < name.Length; i++)
{
switch (name[i])
{
case 'a':
s += '1';break;
case 'q':
s += '2'; break;
}
}
}
How to make it reversed to act like this:
case '1':
s += 'a';break;
case '2':
s += 'q'; break;
My code contains more than 30 statements for each character.
Dictionary. 2. ??????? 3. PROFIT!!!!11