2010-04-07 Rodrigo Kumpera <rkumpera@novell.com>
[mono-project.git] / mono / tests / enumcast.cs
blob8650ba501db303af3e91ea0f6fb000b06651fdba
1 namespace Test {
2 enum MyEnum {
3 ZERO,
4 ONE
6 public class Test {
8 static int unbox_and_return (object obj) {
9 return (int)(MyEnum)obj;
11 public static int Main() {
12 if (unbox_and_return (MyEnum.ZERO) != 0)
13 return 1;
14 if (unbox_and_return (MyEnum.ONE) != 1)
15 return 2;
16 return 0;