代码:
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(); } }