Example #1
0
        public int CompareTo(object obj)
        {
            Account other = obj as Account;

            if (!(obj is Account) || other == null)
            {
                return(-1);
                //throw new Exception("Not is a object Account");
            }

            return(AccountNumber.CompareTo(other.AccountNumber));


            // if (AccountNumber < other.AccountNumber)
            //{
            //    return -1;
            //}
            //else if(AccountNumber == other.AccountNumber)
            //{
            //    return 0;
            //}
            //else
            //{
            //    return 1;
            //}
        }
Example #2
0
 public int CompareTo(IAccount <TAccountKey, TTransactionKey> other)
 {
     return(AccountNumber.CompareTo(other.AccountNumber));
 }