System.Xml.DocumentXPathNavigator.IsDescendant C# (CSharp) Method

IsDescendant() private static method

private static IsDescendant ( XmlNode top, XmlNode bottom ) : bool
top XmlNode
bottom XmlNode
return bool
        private static bool IsDescendant(XmlNode top, XmlNode bottom) {
            for (;;) {
                XmlNode parent = bottom.ParentNode;
                if (parent == null) {
                    XmlAttribute attribute = bottom as XmlAttribute;
                    if (attribute == null) {
                        break;
                    }
                    parent = attribute.OwnerElement;
                    if (parent == null) {
                        break;
                    }
                }
                bottom = parent;
                if (top == bottom) {
                    return true;
                }
            }
            return false;
        }

Same methods

DocumentXPathNavigator::IsDescendant ( XPathNavigator other ) : bool