remove warning
[mono.git] / mcs / class / corlib / System / Array.cs
index b0653b0169a5da70c7b59b05bbeca7238b9ac337..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);
                                }
@@ -238,7 +240,7 @@ namespace System
 
                        void IEnumerator.Reset ()
                        {
-                               throw new NotImplementedException ();
+                               idx = NOT_STARTED;
                        }
 
                        object IEnumerator.Current {