Browse Source

now Item(int index) returns null for nodeList.Count
instead of throwing ArgumentOutOfRangeException.

svn path=/trunk/mcs/; revision=22736

Alon Gazit 22 years ago
parent
commit
044ccb28ca

+ 4 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,7 @@
+2004-02-03  Alon Gazit <[email protected]>
+	* XmlNamedNodeMap - now Item(int index) returns null for nodeList.Count
+	  instead of throwing ArgumentOutOfRangeException.
+
 2004-02-03  Atsushi Enomoto <[email protected]>
 
 	* XmlChar.cs : now GetPredefinedEntity() returns int and -1 for not

+ 1 - 1
mcs/class/System.XML/System.Xml/XmlNamedNodeMap.cs

@@ -56,7 +56,7 @@ namespace System.Xml
 		
 		public virtual XmlNode Item (int index)
 		{
-			if (index < 0 || index > nodeList.Count)
+			if (index < 0 || index >= nodeList.Count)
 				return null;
 			else
 				return (XmlNode) nodeList [index];