I want to declare a new enum with non-default underlying type. This works:
public enum MyEnum : short
{ A, B, C, }
But I don't understand the reason why this doesn't compile:
public enum MyEnum : System.Int16
{ A, B, C, }
Compiler says
Type byte, sbyte, short, ushort, int, uint, long, or ulong expected
I understand that short is an alias for Int16 on all .NET versions (32/64 bit flavors included). I don't see why the compiler gives a different meaning to the alias in that particular case.
Any explanation?