System.Xml.XmlTextReaderImpl.NodeData.IComparable C# (CSharp) Method

IComparable() private method

private IComparable ( object obj ) : int
obj object
return int
            int IComparable.CompareTo( object obj ) {
                NodeData other = obj as NodeData;
                if ( other != null ) {
                    if ( Ref.Equal( localName, other.localName ) ) {
                        if ( Ref.Equal( ns, other.ns ) ) {
                            return 0;
                        }
                        else {
                            return string.CompareOrdinal( ns, other.ns );
                        }
                    }
                    else {
                        return string.CompareOrdinal( localName, other.localName );
                    }
                }
                else {
                    Debug.Assert( false, "We should never get to this point." );
                    return GetHashCode().CompareTo( other.GetHashCode() );
                }
            }
        }