当前位置:网站首页>C# List字段排序含有数字和字符
C# List字段排序含有数字和字符
2022-04-23 04:45:00 【spring-java】
var temValue = 0;
var resultChar = result.Where(x => !int.TryParse(x.listcode.ToString().Replace(".", ""), out temValue)).OrderBy(y => y.listcode.ToString()).ToList();
result = result.Where(x => int.TryParse(x.listcode.ToString().Replace(".", ""), out temValue)).ToList().OrderBy(y => Convert.ToInt32(y.listcode.ToString().Replace(".", ""))).ToList();
result.AddRange(resultChar);
版权声明
本文为[spring-java]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_41463944/article/details/124326604
边栏推荐
- AWS eks add cluster user or Iam role
- Ali's ten-year technical experts jointly created the "latest" jetpack compose project combat drill (with demo)
- 2019 is coming to an end, the longest day.
- Go reflection - go language Bible learning notes
- Differences among electric drill, electric hammer and electric pick
- Summary of MySQL de duplication methods
- The last day of 2021 is the year of harvest.
- Youqilin 22.04 lts version officially released | ukui 3.1 opens a new experience
- No such file or directory problem while executing shell
- Custom switch control
猜你喜欢

Simply drag objects to the item bar

阿里十年技术专家联合打造“最新”Jetpack Compose项目实战演练(附Demo)

补:注解(Annotation)

Experience summary and sharing of the first prize of 2021 National Mathematical Modeling Competition

Practice and exploration of knowledge map visualization technology in meituan

MySQL queries users logged in for at least N consecutive days

Druid -- JDBC tool class case

383. Ransom letter

Innovative practice of short video content understanding and generation technology in meituan

Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
随机推荐
zynq平台交叉编译器的安装
Practice and exploration of knowledge map visualization technology in meituan
Introduction to raspberry pie 3B - system installation
解决ValueError: Argument must be a dense tensor: 0 - got shape [198602], but wanted [198602, 16].
520. Detect capital letters
IDE idea automatic compilation and configuration of on update action and on frame deactivation
QML advanced (IV) - drawing custom controls
Com alibaba. Common methods of fastjson
2020 is coming to an end, special and unforgettable.
The 14th issue of HMS core discovery reviews the long article | enjoy the silky clip and release the creativity of the video
QML advanced (V) - realize all kinds of cool special effects through particle simulation system
Recursive call -- Enumeration of permutations
ApplicationContext injection bean
Leetcode002 -- inverts the numeric portion of a signed integer
getprop 属性
补充番外14:cmake实践项目笔记(未完待续4/22)
leetcode009--用二分查找在数组中搜索目标值
The object needs to add additional attributes. There is no need to add attributes in the entity. The required information is returned
Record the ThreadPoolExecutor main thread waiting for sub threads
Leetcode005 -- delete duplicate elements in the array in place