I am new to C# and would like to know a basic question. I want to define a method in C# that takes following input as string:
C1
C2
C3
C4
.....C500

When C1 or C2 is input, I want my output as 1. Whenever C3 or C4 is input, output should be 2. Similarly for C5 or C6, the output should be 3 and so on... Is there a better way other than if/else or switch case.

```
public int GetInt(string input)
{
int x;
return x;
}

```

Switch case or If else only makes sense if I have limited string values. However, i have almost 500 or even more strings that can be used as input