------解决方案-------------------- List<string> list = new List(){
"12","09","10","32","25","01","05","24","15","17","08","05","07","20","21","22","30","03","19"};
List<string> result = list.OrderBy(x => int.Parse(x)).ToList(); ------解决方案--------------------
可以。
其实,如果开头有0补齐的,反倒不用Parse
List<string> result = list.OrderBy(x => x).ToList(); 就可以了。 ------解决方案--------------------
List<string> list = new List<string>{
"12","09","10","32","25","01","05","24","15","17","08","05","07","20","21","22","30","03","19"};
List<string> result = list.OrderBy(c => int.Parse(c)).ToList();
result.ForEach(c => Console.WriteLine(c));