title: How to determine the represented type of enum value?
body: <p>Consider the following two enums:</p>
  
  <pre><code>enum MyEnum1 {
      Value1 = 1,
      Value2 = 2,
      Value3 = 3
  }
  
  enum MyEnum2 {
       Value1 = 'a',
       Value2 = 'b',
       Value3 = 'c'
  }
  </code></pre>
  
  <p>I can retrieve the physical value represented by these enum values through explicit casting, <code>((int)MyEnum1.Value2) == 2</code> or <code>((char)MyEnum2.Value2) == 'b'</code>, but what if I want to get the char representation or the int representation without first knowing the type to cast to? </p>
  
  <p>Is it possible to get the underlying value of an enum without a cast or is it at least programatically possible to determine the correct type of the underlying value?</p>