当前位置:网站首页>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
边栏推荐
- Detailed explanation of life cycle component of jetpack
- Solutions to the failure of sqoop connection to MySQL
- IDE idea automatic compilation and configuration of on update action and on frame deactivation
- MySQL time function query
- Shanghai Hangxin technology sharing 𞓜 overview of safety characteristics of acm32 MCU
- Mysql50 basic exercises
- Unity rawimage background seamlessly connected mobile
- Gets all dates between two times
- Improving 3D object detection with channel wise transformer
- leetcode003--判断一个整数是否为回文数
猜你喜欢

Windows remote connection to redis

简单的拖拽物体到物品栏

RC低通滤波器的逆系统

The perfect combination of collaborative process and multi process

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

Record your own dataset with d435i, run orbslam2 and build a dense point cloud

Flink's important basics

QML进阶(五)-通过粒子模拟系统实现各种炫酷的特效

Spark FAQ sorting - must see before interview

test
随机推荐
Fusobacterium -- symbiotic bacteria, opportunistic bacteria, oncobacterium
Getprop property
General enumeration constant class
Record the ThreadPoolExecutor main thread waiting for sub threads
Recommended scheme for national production of electronic components for wireless charging
Differences among electric drill, electric hammer and electric pick
那些年我面试过的Android开发岗总结(附面试题+答案解析)
leetcode003--判断一个整数是否为回文数
KVM error: Failed to connect socket to ‘/var/run/libvirt/libvirt-sock‘
程序员抱怨:1万2的工资我真的活不下去了,网友:我3千咋说
Brushless motor drive scheme based on Infineon MCU GTM module
Small volume Schottky diode compatible with nsr20f30nxt5g
Youqilin 22.04 lts version officially released | ukui 3.1 opens a new experience
Special topic of data intensive application system design
Leetcode003 -- judge whether an integer is a palindrome number
test
Spark small case - RDD, broadcast
Open the past and let's start over.
C language: Advanced pointer
Solutions to the failure of sqoop connection to MySQL