[C#/Linq] 두 목록의 차집합을 구하는 쿼리


[C#/Linq] 두 목록의 차집합을 구하는 쿼리

> Enumerable.Except (차집합 샘플) public class Example { public static void Main() { Console.Write("> \n"); string[] names1 = { "A", "B", "C", "D", "E", "F" }; string[] names2 = { "D", "E", "F", "G", "H", "I" }; // names1에는 있지만, names2에는 없는 항목을 추출. IEnumerable differenceQuery = names1.Except(names2); // 출력 foreach (string s in differenceQuery) Console.WriteLine(s); Console.WriteLine(System.Environmen..


원문링크 : [C#/Linq] 두 목록의 차집합을 구하는 쿼리