Why do we need to type cast an enum in C#
<p>I have an enum like:</p>

<pre><code>public enum Test:int
{
   A=1, 
   B=2
}
</code></pre>

<p>So here I know my enum is an int type but if I want to do something like following:</p>

<pre><code>int a = Test.A;
</code></pre>

<p>this doesn't work.</p>

<p>If I have a class like:</p>

<pre><code>public class MyTest
{
    public static int A =1;
}
</code></pre>

<p>I can say ,</p>

<pre><code>int a = MyTest.A;
</code></pre>

<p>Here I don't need to cast <code>A</code> to int explicitly.</p>
