[2019-12] [threads] Add back mono_threads_attach_tools_thread as a public API (#18074)
[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;