+ -
当前位置:首页 → 问答吧 → SortedList<string, Keyword> ResultList 怎么按照Keyword类排序

SortedList<string, Keyword> ResultList 怎么按照Keyword类排序

时间:2011-12-24

来源:互联网

C# code
    class Keyword :IComparable<Keyword>
    {
        public int StartIndex;
        public int EndIndex;
        public int Count;
        public string KeyWordString;
    }



这是我的 Keyword类 怎么 按照 keyword中的count大小 给这个sortedlist排序呢?如果不可以 有没有其他的collection类可以实现这个功能

作者: hypnoz2012spring   发布时间: 2011-12-24

在CompareTo 方法里写

作者: Sandy945   发布时间: 2011-12-24