예제 #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;
            //}
        }
예제 #2
0
 public int CompareTo(IAccount <TAccountKey, TTransactionKey> other)
 {
     return(AccountNumber.CompareTo(other.AccountNumber));
 }