ARCed.Scintilla.Range.CompareTo C# (CSharp) Method

CompareTo() public method

public CompareTo ( object otherObj ) : int
otherObj object
return int
        public int CompareTo(object otherObj)
        {
            var other = otherObj as Range;

            if (other == null)
                return 1;

            if (other._start < this._start)
                return 1;
            else if (other._start > this._start)
                return -1;

            //	Starts must equal, lets try ends
            if (other._end < this._end)
                return 1;
            else if (other._end > this._end)
                return -1;

            //	Start and End equal. Comparitavely the same
            return 0;
        }