现在的位置: 首页 > 综合 > 正文

c# 中 List能对T对象排序的方法

2013年06月01日 ⁄ 综合 ⁄ 共 332字 ⁄ 字号 评论关闭
c#的List<T>默认能够对基本类型排序,比如int, string, 但是对于用户自定义的对象排序则需要对代码进行少许改动,方法为:
 
Then for List<StringValuePair> list, we can call list.Sort() to sort the objects.

抱歉!评论已关闭.