How Sort A List By A Part Of That String Desc

前端 未结 6 1645
一整个雨季
一整个雨季 2021-01-23 00:09

i have a list like this :

List list_lines = new List();
list_lines.add(\"name1__pass1__com__14__55\");
list_lines.add(\"name2__pas         


        
6条回答
  •  悲哀的现实
    2021-01-23 00:38

    var myList = list_lines.OrderBy(x => int.Parse(x.Split(new string[] {"__"}, StringSplitOptions.None)[4])).ToList();
    

提交回复
热议问题