c# dictionary,list排序
2024-09-03 01:13:04
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);
最新文章
- Linux下安装JDK多种方式
- js整理4
- 【章老师的课程】Black Box Testing
- ASP.NET features need application service database support
- DEDECMS之七 如何实现文章推荐排行榜
- java编程思想-复用类总结
- Android开发--环境配置
- DEBUG模式下屏蔽某些烦人的动态日志信息
- 【MySQL】查询使用临时表
- 利用while(code!=EOF){}来实现“无限”循环
- python 正则的使用 —— 编写一个简易的计算器
- 洛谷 P1057 传球游戏 【dp】(经典)
- 每秒更新时间 v-text的应用 (解决闪现{}问题)
- LintCode 407: Plus One
- jpa No Dialect mapping for JDBC type:-9
- hdu 2857:Mirror and Light(计算几何,点关于直线的对称点,求两线段交点坐标)
- 身份证真实性校验js、mini ui身份证长度正则验证
- 字符串aaaa......bbbb....ccc...dddddd用正则替换为abcd
- 8.python 系统批量运维管理器之pexpect模块
- node.js获取命令参数
热门文章
- ajax中error函数参数详解
- CEF源码编译
- 用PowerShell在China Azure创建ARM虚拟机
- Unreal Engine 4的常见Tips
- SQL基础(3)
- mybatis---demo1--(单表增删改查)----bai
- 开发环境入门 linux基础 (部分) 归档 压缩 Vi编译器 系统分区
- NodeJS之Url的使用
- java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory报错springmvc
- XSS的各种用途