[C#/Linq] 문자열의 길이에 따른 1차 오름차순 정렬


[C#/Linq] 문자열의 길이에 따른 1차 오름차순 정렬

> 문자열 길이의 오름차순으로 정렬하는 방법 using System.Xml.Linq; public class Example { public static void Main() { Console.Write("> \n"); string[] words = { "this", "code", "killer", "very", "funny" }; // 문자열 길이로 정렬. IEnumerable query = from word in words orderby word.Length select word; foreach (string str in query) Console.WriteLine(str); Console.WriteLine(System.Environment.NewLine); Console.WriteLine("Press..


원문링크 : [C#/Linq] 문자열의 길이에 따른 1차 오름차순 정렬