* XmlNodeArrayList.cs, XmlNodeListChildren.cs : bugzilla #39920 fix.
svn path=/trunk/mcs/; revision=12707
+2003-03-21 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
+
+ * XmlNodeArrayList.cs, XmlNodeListChildren.cs : bugzilla #39920 fix.
+
2003-03-19 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
* XmlDeclaration.cs : quick fix, not to use regex for set_Value.
public override XmlNode Item (int index)
{
+ // Return null if index is out of range. by DOM design.
+ if (index < 0 || _rgNodes.Count <= index)
+ return null;
+
return (XmlNode) _rgNodes [index];
}
}
{
XmlNode requestedNode = null;
+ // Return null if index is out of range. by DOM design.
+ if (Count <= index)
+ return null;
+
// Instead of checking for && index < Count which has to walk
// the whole list to get a count, we'll just keep a count since
// we have to walk the list anyways to get to index.