[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / test-named-05.cs
blob361f5ab58fa97bd9bc73df97ef787a84ddf102a1
1 using System;
3 public class A
5 public virtual int Foo (int i)
7 return 1;
10 public virtual int this [int i, string s] {
11 get {
12 return 1;
17 public class B : A
19 public new int Foo (int x)
21 return 2;
24 public new int this [int i, string s2] {
25 get {
26 return 2;
31 public class Test
33 public static int Main ()
35 B p = new B ();
36 if (p.Foo (i : 1) != 1)
37 return 1;
39 if (p.Foo (2) != 2)
40 return 2;
42 if (p [i : 1, s : "2"] != 1)
43 return 3;
45 if (p [i : 1, s2 : "2"] != 2)
46 return 4;
48 if (p [1, "2"] != 2)
49 return 5;
51 return 0;