using System;
+using System.Collections;
using System.Runtime.CompilerServices;
public interface X
if (d [3,5] != 15)
return 11;
+ //
+ // Now test for bug 35492
+ //
+ ChildList xd = new ChildList ();
+
+ xd.Add (0);
+ if (0 != (int)xd [0])
+ return 12;
+
+ xd.Test ();
+ if (1 != (int) xd [0])
+ return 13;
+
return 0;
}
+ class MyArray : ArrayList
+ {
+ public override object this[int index]
+ {
+ get { return base[index]; }
+ set { base[index] = value;}
+ }
+ }
+
public static int Main ()
{
int result = Test ();
Console.WriteLine ("RESULT: " + result);
+ E e = new E ();
+ e.g = "monkey";
+
+ //
+ // Now test base [...]
+ //
+ MyArray arr = new MyArray ( );
+ arr.Add ( "String value" );
+ if (arr[0].ToString () != "String value")
+ return 100;
+
return result;
}
+
}
public class A
}
}
}
+
+public class E {
+ public virtual string g {
+ get { return "g"; }
+ set { }
+ }
+}
+
+public class F : E {
+ public override string g {
+ get { return "h"; }
+ }
+}
+
+public class DisposableNotifyList : ArrayList
+ {
+ }
+
+public class ChildList : DisposableNotifyList
+ {
+ public void Test()
+ {
+ base[0] = 1;
+
+ }
+ }