[C#/Linq] Intersect 사용예제.


[C#/Linq] Intersect 사용예제.

using System.Linq; using System.Xml.Linq; public class Example { public static void Main() { Console.Write("> \n"); string[] words = { "this", "code", "killer", "killer", "code", "funny" }; string[] words2 = { "this", "AA", "killer", "BB", "code", "CC" }; IEnumerable query = from code in words.Intersect(words2) select code; foreach (var str in query) { Console.WriteLine(str); } Console.WriteLine..


원문링크 : [C#/Linq] Intersect 사용예제.