switch case statment in C# with hex values
<p>I have a uint value received and perceived (in terms of use) in hex values and I want to set a switch case according to this value as in the following example:</p>

<pre><code>uint foo=someHexValue
uint a;
switch(foo){
    case 0xFFFF : a = 0x0;break;   
    case 0xFFFE : a = 0x1;break;   
    case 0xFFFC : a = 0x2;break;
    case 0x0001 : a = 0x3;break;   
    case 0x0010 : a = 0x4;break; 
}
</code></pre>

<p>Note that the values of foo are not necessarily ordered or contains all possible values. </p>

<p>Can I go about it with respect to the decimal values as in:</p>

<pre><code>uint foo=hexValue
uint a;
switch(foo){
    case 65535: a = 0x0;break;   
    case 65534: a = 0x1;break;   
    case 65532: a = 0x2;break; 
    case 1: a = 0x3;break;   
    case 16: a = 0x4;break;   
}
</code></pre>

<p>Is it possible to use hex values in switch case? Is there another approach?</p>