using System; enum Foo { Bar = 1 } public class Test { public static void Main() { Console.WriteLine((Foo)2); } }