2 using System
.Collections
;
3 using System
.Runtime
.CompilerServices
;
22 public int this [int a
] {
29 public long this [double a
] {
38 [IndexerName ("Whatever")]
39 new public long this [double a
] {
45 [IndexerName ("Whatever")]
46 public float this [long a
, int b
] {
52 public int InstanceTest ()
56 Console
.WriteLine ("INSTANCE TEST");
58 if (this [index
] != 4)
60 if (base [index
] != 3)
66 public static int Test ()
72 Console
.WriteLine (z
[1]);
73 Console
.WriteLine (y
[2]);
74 Console
.WriteLine (x
[3]);
85 Console
.WriteLine (z
[index
]);
86 Console
.WriteLine (y
[index
]);
93 int retval
= z
.InstanceTest ();
110 // Now test for bug 35492
112 ChildList xd
= new ChildList ();
115 if (0 != (int)xd
[0])
119 if (1 != (int) xd
[0])
125 class MyArray
: ArrayList
127 public override object this[int index
]
129 get { return base[index]; }
130 set { base[index] = value;}
134 public static int Main ()
136 int result
= Test ();
138 Console
.WriteLine ("RESULT: " + result
);
144 // Now test base [...]
146 MyArray arr
= new MyArray ( );
147 arr
.Add ( "String value" );
148 if (arr
[0].ToString () != "String value")
158 [IndexerName("Monkey")]
159 public int this [int value] {
168 public long this [long a
, int value] {
177 public int this [int value] {
186 public long this [long a
, int value] {
194 public virtual string g
{
201 public override string g
{
206 public class DisposableNotifyList
: ArrayList
210 public class ChildList
: DisposableNotifyList