简单的实现一个利用list排序的方法:

 

  this.CallHistoryList.Sort(CompareTo);
 public int CompareTo(CallHistory left, CallHistory other)
        {
            if (left.StartTime > other.StartTime)
            {
                return -1;
            }
            else if (left.StartTime == other.StartTime)
            {
                return 0;
            }
            else
            {
                return 1;
            }

        }

 

posted on 2012-01-12 18:00  higirle  阅读(219)  评论(0编辑  收藏  举报