[C#/Linq] Select 절 기본 이해.


[C#/Linq] Select 절 기본 이해.

public class Example { public static void Main() { Console.Write("> \n"); List words = new() { "code", "killer", "the", "day" }; var query = from word in words select word.Substring(0, 1); foreach (string s in query) Console.WriteLine(s); Console.WriteLine(System.Environment.NewLine); Console.WriteLine("Press any key to exit"); Console.ReadKey(); } }


원문링크 : [C#/Linq] Select 절 기본 이해.