Dictionary Key排序

Dictionary<string, string> dct= new Dictionary<string, string>();

Dictionary<string, string> dctNew = dct.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value);

list Key排序

Public class student{

    public int grade
{
set;
get;
} public int age
{
set;
get;
} public string name
{
set;
get;
}
} List<student> students = new List<student>();
students.OrderBy(x=>x.grade).ThenBy(x=>x.age);

  

最新文章

  1. Linux下安装JDK多种方式
  2. js整理4
  3. 【章老师的课程】Black Box Testing
  4. ASP.NET features need application service database support
  5. DEDECMS之七 如何实现文章推荐排行榜
  6. java编程思想-复用类总结
  7. Android开发--环境配置
  8. DEBUG模式下屏蔽某些烦人的动态日志信息
  9. 【MySQL】查询使用临时表
  10. 利用while(code!=EOF){}来实现“无限”循环
  11. python 正则的使用 —— 编写一个简易的计算器
  12. 洛谷 P1057 传球游戏 【dp】(经典)
  13. 每秒更新时间 v-text的应用 (解决闪现{}问题)
  14. LintCode 407: Plus One
  15. jpa No Dialect mapping for JDBC type:-9
  16. hdu 2857:Mirror and Light(计算几何,点关于直线的对称点,求两线段交点坐标)
  17. 身份证真实性校验js、mini ui身份证长度正则验证
  18. 字符串aaaa......bbbb....ccc...dddddd用正则替换为abcd
  19. 8.python 系统批量运维管理器之pexpect模块
  20. node.js获取命令参数

热门文章

  1. ajax中error函数参数详解
  2. CEF源码编译
  3. 用PowerShell在China Azure创建ARM虚拟机
  4. Unreal Engine 4的常见Tips
  5. SQL基础(3)
  6. mybatis---demo1--(单表增删改查)----bai
  7. 开发环境入门 linux基础 (部分) 归档 压缩 Vi编译器 系统分区
  8. NodeJS之Url的使用
  9. java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory报错springmvc
  10. XSS的各种用途