protected int CompareToEmpty(object obj) { XmlEmptySortKey that = obj as XmlEmptySortKey; Debug.Assert(that != null && !(this is XmlEmptySortKey)); return(that.IsEmptyGreatest ? -1 : 1); }
public override int CompareTo(object obj) { XmlEmptySortKey that = obj as XmlEmptySortKey; if (that == null) { // Empty compared to non-empty Debug.Assert(obj is XmlSortKey); return(-(obj as XmlSortKey).CompareTo(this)); } // Empty compared to empty return(BreakSortingTie(that)); }