Wed Sep 11 15:26:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / corlib / System / Array.cs
index 52a32217665bb1857967af7f3559b2f4fac01d62..43e8344bcdcce50d4422743c841ffb7e4205f356 100644 (file)
@@ -1,4 +1,4 @@
-//
+
 // System.Array.cs
 //
 // Authors:
@@ -48,7 +48,7 @@ namespace System
                }
 
                // IList interface
-               public object this [int index] {
+               object IList.this [int index] {
                        get {
                                return GetValueImpl (index);
                        } 
@@ -66,6 +66,9 @@ namespace System
                }
 
                bool IList.Contains (object value) {
+                       if (this.Rank > 1)
+                               throw new RankException ("Only single dimension arrays are supported.");
+
                        int length = this.Length;
                        for (int i = 0; i < length; i++) {
                                if (value.Equals (this.GetValueImpl (i)))
@@ -137,7 +140,7 @@ namespace System
                internal extern static Array CreateInstanceImpl(Type elementType, int[] lengths, int [] bounds);
 
                // Properties
-               public virtual int Count {
+               int ICollection.Count {
                        get {
                                return Length;
                        }