LINQ的Except方法

在两个集合中,左边集合减去右边集合的元素:

source code:

 List<int> a = new List<int>{
                { 3 }, { 5 }, { 7 }
            };

            List<int> b = new List<int> {
                { 5 }, { 6 }, { 9 }
            };

            var result = a.Except(b);

            result.ForEach(delegate (int n)
            {
                WriteLiteral(n + "<br>");
            });



原文地址:https://www.cnblogs.com/insus/p/5374168.html