public static string[] SortLength(string[] arr) { string[] sorted = arr .OrderBy(x => x.Length) //.OrderByDescending .ToArray(); return sorted; }