2010-04-13 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git] / mcs / tests / test-206.cs
blob0a0209b5a3d518600c69388060b545f3d903c978
1 using System;
3 interface I
5 // int this [int i] { get; }
6 int[] this [params int[] ii] { get; }
9 class X : I {
10 public int this [int i] {
11 get { return i; }
14 public int[] this [params int[] ii] {
15 get { return new int[] { this[1], this[2], this[ii.Length] }; }
18 public static void Main ()
20 X x = new X ();
21 Console.WriteLine (x [1]);
22 int[] r = x [2, 2, 1, 2, 0];
23 for (int i = 0; i < r.Length; i++)
24 Console.Write (r [i] + " ");
25 Console.WriteLine ();