remove warning
[mono.git] / mcs / class / corlib / System / Array.cs
index 5e320a6ca9d14471e5ad5d5099d773e6503e8c6d..84b3a1879023ed11be904c3fa8c7981f44952f92 100644 (file)
@@ -229,8 +229,10 @@ namespace System
 
                        public T Current {
                                get {
-                                       if (idx < 0)
-                                               throw new InvalidOperationException ();
+                                       if (idx == NOT_STARTED)
+                                               throw new InvalidOperationException ("Enumeration has not started. Call MoveNext");
+                                       if (idx == FINISHED)
+                                               throw new InvalidOperationException ("Enumeration already finished");
 
                                        return array.InternalArray__get_Item<T> (array.Length - 1 - idx);
                                }