C#LINQ问题敲代码找不到orderby怎么办
发布网友
发布时间:2022-05-20 13:10
我来回答
共1个回答
热心网友
时间:2023-10-24 07:23
string[] names = { "Hello", "Good", "YES", "HOME", "Diyo" };
string[] names_asc = names.OrderBy(t => t).ToArray<string>();
string[] names_desc = names.OrderByDescending(t => t).ToArray<string>();