to many IF how to make quicker search c# : <p>Have 5 Names and 5 number.
Giv name need number.
better way?</p>

<pre><code> string name = "Mark";
    int x;
if(name == "John")
{
 x = 1;
}else if(name == "Jimy"){
x = 2;
}else if(name == "Mark"){
x = 3;
}.... etc
return x;
</code></pre>

<p>result is x=3.</p>
