3 public class TestParams
5 object this [params string[] idx] {
10 Console.WriteLine (value);
11 if ((string)value != "A(B)")
12 throw new ApplicationException (value.ToString ());
16 public void TestMethod ()
18 this ["A"] += "(" + this ["B"] + ")";
19 this [new string[] {"A"}] += "(" + this ["B"] + ")";
23 public class TestNonParams
25 object this [string idx] {
30 Console.WriteLine (value);
31 if ((string)value != "A(B)")
32 throw new ApplicationException (value.ToString ());
36 public void TestMethod ()
38 this ["A"] += "(" + this ["B"] + ")";
44 public static int Main()
46 new TestNonParams().TestMethod ();
47 new TestParams().TestMethod ();