Check out example codes for "c# sort array string by length". It will help you in understanding the concepts better.

Code Example 1

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

            return sorted;
        }

Learn ReactJs, React Native from akashmittal.com