public class Example
{
public static void Main()
{
Console.Write("<< Linq - 필터링 예제 >> \n");
string[] words = { "this", "that", "code", "dog", "cat" };
IEnumerable<string> query = from word in words
where word.Length == 3
select word;
foreach (string str in query)
Console.WriteLine(str);
Console.WriteLine(System.Environment.NewLine);
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}