[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / test-826.cs
blobbda94deda68daf1041a567ce24a7e7b844cdc3a7
1 using System;
2 using System.Reflection;
4 public interface I
6 int Foo ();
9 public class A : I
11 int I.Foo ()
13 Console.WriteLine ("a");
14 return 1;
18 public class AA : A, I
20 public int Foo ()
22 Console.WriteLine ("aa");
23 return 2;
27 public class B : A
29 public int Foo ()
31 Console.WriteLine ("b");
32 return 3;
36 public class Test
38 public static int Main ()
40 I i = new AA ();
41 if (i.Foo () != 2)
42 return 1;
44 i = new B ();
45 if (i.Foo () != 1)
46 return 2;
48 var m = typeof (B).GetMethod ("Foo");
49 Console.WriteLine (m.Attributes);
50 if (m.Attributes != (MethodAttributes.Public | MethodAttributes.HideBySig))
51 return 3;
53 return 0;