Founded that:
typeof(System.Enum).IsClass == false
It\'s become strange that System.Enum has also .IsValueType == false<
I happened to recently revisit this problem under CLR4 and guess what, it is fixed now. The following definitions:
public struct SomeValueType{}
public enum SomeEnum
{
FirstElement
}
with this program
Console.WriteLine( typeof( Enum ).IsClass );
Console.WriteLine( typeof( SomeEnum ).IsClass );
Console.WriteLine( typeof( ValueType).IsClass );
Console.WriteLine( typeof( SomeValueType).IsClass );
Yields the following results:
CLR2: False, False, True, False
CLR4: True, False, True, False