is there any way to simplify this double conditional clauses structure?
<p>for example</p>

<pre><code>if (x=="A)
    switch (y)
    {
    case "1": Do1();break;
    case "2": Do2();break;
    case "3": Do3();break;
    }
else if (x=="B")
    switch (y)
    {
    case "1": Do4();break;
    case "2": Do5();break;
    case "3": Do6();break;
    }
else
    switch (y)
    {
    case "1": Do7();break;
    case "2": Do8();break;
    case "3": Do9();break;
    }
</code></pre>

<p>I wish I could do the following, however it has many redundant checks.</p>

<pre><code>    if (x=="A" &amp;&amp; y=="1")
        Do1();
    else if (x=="A" &amp;&amp; y=="2")
        Do2();
    else if (x=="A" &amp;&amp; y=="3")
        Do3();
    else if (x=="B" &amp;&amp; y=="1")
        Do4();
    else if (x=="B" &amp;&amp; y=="2")
        Do5();
    else if (x=="B" &amp;&amp; y=="3")
        Do6();
    else if (x=="C" &amp;&amp; y=="1")
        Do7();
    else if (x=="C" &amp;&amp; y=="2")
        Do8();
    else if (x=="C" &amp;&amp; y=="3")
        Do9();
</code></pre>
