public static string[] SortLength(string[] arr)
{
string[] sorted = arr
.OrderBy(x => x.Length) //.OrderByDescending
.ToArray();
return sorted;
}
static string SortString(string input)
{
char[] characters = input.ToArray();
Array.Sort(characters);
return new string(characters);
}
String.Concat(str.OrderBy(c => c))