Sage.Integration.Northwind.Application.API.Token.CompareTo C# (CSharp) Method

CompareTo() public method

Compares the current instance with another object of the same type.
obj is not the same type as this instance.
public CompareTo ( object obj ) : int
obj object An object to compare with this instance.
return int
        public int CompareTo(object obj)
        {
            Token token;

            token = obj as Token;
            if (token == null)
                throw new ArgumentException("Objects are not of the same type.");
            if (this.sequenceNumber < token.sequenceNumber)
                return -1;
            if (this.sequenceNumber > token.sequenceNumber)
                return 1;

            return this.id.CompareTo(token.id);
        }