kingBook

导航

C# List.Sort

List<int> list=new List<int>{2,3,5,1,4};

list.Sort((int a,int b)=>{
	return a-b;
});

string str="";
for(int i=0;i<list.Count;i++){
	str+=list[i].ToString();
}
Debug.Log(str);//output:12345

posted on 2021-02-22 11:59  kingBook  阅读(17)  评论(0编辑  收藏