static public NodesMatch ( |
||
node1 | ||
node2 | ||
return | bool |
/// ------------------------------------------------------------------------------------ /// <summary> /// Find the index of the node in nodes that 'matches' the target node. /// Return -1 if not found. /// </summary> /// <param name="nodes">The nodes.</param> /// <param name="target">The target.</param> /// <returns></returns> /// ------------------------------------------------------------------------------------ public static int FindIndexOfMatchingNode(IEnumerable <XmlNode> nodes, XmlNode target) { int index = 0; foreach (XmlNode node in nodes) { if (XmlUtils.NodesMatch(node, target)) { return(index); } index++; } return(-1); }