예제 #1
0
        //默认排序按照总价格进行升序排序
        public int CompareTo(object obj)
        {
            if (!(obj is Order))
            {
                throw new System.ArgumentException();
            }
            Order tmp = obj as Order;

            return(TotalPrice.CompareTo(tmp.TotalPrice));
        }