コード例 #1
0
 private void GetPriceChangeName()
 {
     foreach (MoneyGroup mgp in basicMoneyGroup)
     {
         foreach (MoneyBoth mBth in mgp.allMoneyBoth)
         {
             MyPriceChange mpc = new MyPriceChange(mBth.Name, mBth.PriceChange);
             Setup.priceChangeOrder.Add(mpc);
         }
     }
     Setup.priceChangeOrder.Sort();
 }
コード例 #2
0
        public int CompareTo(Object obj)
        {
            int flg = 0;

            try
            {
                MyPriceChange sObj = (MyPriceChange)obj;
                flg = this.PriceChange.CompareTo(sObj.PriceChange); //先按照“天”进行排序
                if (flg == 0)                                       //如果 天 相同,再按照“小时“的大小进行排序
                {
                }
            }
            catch (Exception ex)
            {
                throw new Exception("比较异常", ex.InnerException);
            }
            return(flg);
        }