Answers for "c# sort array string by length"

C#
1

c# sort array string by length

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

            return sorted;
        }
Posted by: Guest on January-01-1970

Code answers related to "c# sort array string by length"

C# Answers by Framework

Browse Popular Code Answers by Language