All pastes #392913 Raw Edit

Mine

public text v1 · immutable
·published 2007-03-13 04:52 UTC
rendered paste body
using System;

class foo
{
	static void Main ()
	{
		//Incorrect: does not work on MS .NET, returns System.Byte on Mono
		Console.WriteLine (typeof (MyEnum).GetElementType ());

		//Correct: returns System.Byte on both MS .NET and Mono
		Console.WriteLine (Enum.GetUnderlyingType (typeof (MyEnum)));
	}

	enum MyEnum : byte { }
}