C# 中如何将List里的集合转换成字符串并按指定的字符进行分隔?

代码:
using System;
using System.Collections.Generic;
publicclassMyClass
{
publicstaticvoidMain()
{
List<string> names =newList<string>(){"ccc","xxx","aaa","bbbb"};
names.Sort();
var result =String.Join(",", names.ToArray());
Console.Write(result);
Console.ReadKey();
}
}

 

 



相关文章
相关标签/搜索