Răsfoiți Sursa

2005-05-05 Zoltan Varga <[email protected]>

	* List.cs: Applied patch from Mart Roosmaa ([email protected]). 
	Fix Insert method. Fixes #74824.

svn path=/trunk/mcs/; revision=44084
Zoltan Varga 21 ani în urmă
părinte
comite
7d9ac9ff49

+ 5 - 0
mcs/class/corlib/System.Collections.Generic/ChangeLog

@@ -1,3 +1,8 @@
+2005-05-05  Zoltan Varga  <[email protected]>
+
+	* List.cs: Applied patch from Mart Roosmaa ([email protected]). 
+	Fix Insert method. Fixes #74824.
+
 2005-04-29  Martin Baulig  <[email protected]>
 
 	Reflect latest spec changes.

+ 2 - 2
mcs/class/corlib/System.Collections.Generic/List.cs

@@ -273,8 +273,8 @@ namespace System.Collections.Generic
 		
 		public void Insert (int index, T item)
 		{
-			if ((uint) index < (uint) size)
-				throw new ArgumentOutOfRangeException ();
+			if ((uint) index > (uint) size)
+				throw new ArgumentOutOfRangeException ("index");
 			
 			Shift (index, 1);
 			this [index] = item;