Compares two nodes to determine their relative XML document order.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Return ValueType: System::Int32
An int containing 0 if the nodes are equal; -1 if n1 is before n2; 1 if n1 is after n2.
The XContainer stores its child nodes as a singly-linked list of XNode objects. This means that the method must traverse the ancestors of the two nodes being compared until it finds the common parent. Then it must traverse the list of the common parent’s child nodes to determine the order of the two nodes being compared. Therefore, using this method might affect your performance.
.NET FrameworkSupported in: 4.6, 4.5, 4, 3.5
.NET Framework Client ProfileSupported in: 4, 3.5 SP1
XNA FrameworkSupported in: 3.0
Portable Class LibrarySupported in: Portable Class Library
Supported in: Windows Phone 8.1
Supported in: Windows Phone Silverlight 8.1
Supported in: Windows Phone Silverlight 8