Changing the underlying type of an enumeration to long
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1813408/c-int-int32-and-enums">C# int, Int32 and enum&#39;s</a>  </p>
</blockquote>



<p>C# allows you to set the underlying type of an enumeration to long. But, how would you explain the difference in behavior when you try to compile the following two statements:</p>

<pre><code>public enum Colors : long
{
   Blue = 512L,
   Purple = 1024L
}
</code></pre>

<p>and</p>

<pre><code>public enum Colors : System.Int64
{
   Blue = 512L,
   Purple = 1024L
}
</code></pre>

<p>The first one compiles oK (with : long), while the second (with : System.Int64) wont compile - you get an error: <i>Type byte, sbyte, short, ushort, int, uint, long, or ulong expected</i> Note: Obviously, I understand the error message. What has me baffled is that I thought that "long" is more or less an alias for "Int64"</p>
