diff options
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlLinkedNode.cs')
-rw-r--r-- | mcs/class/System.XML/System.Xml/XmlLinkedNode.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlLinkedNode.cs b/mcs/class/System.XML/System.Xml/XmlLinkedNode.cs index bf63853625b..01a9b0a8444 100644 --- a/mcs/class/System.XML/System.Xml/XmlLinkedNode.cs +++ b/mcs/class/System.XML/System.Xml/XmlLinkedNode.cs @@ -58,7 +58,17 @@ namespace System.Xml public override XmlNode NextSibling { - get { return ParentNode == null || ParentNode.LastChild == this ? null : nextSibling; } + get { + if(ParentNode == null) { + return null; + } + else if (Object.ReferenceEquals(nextSibling, ParentNode.LastLinkedChild.NextLinkedSibling) == false) { + return nextSibling; + } + else { + return null; + } + } } internal XmlLinkedNode NextLinkedSibling |