[转载]获取2个集合List<T>的共同元素

                List<int> a = new List<int> { 1, 2, 3, 4, 5, 6 };
                List<int> b = new List<int> { 1, 21, 13, 14, 15, 61 };
                List<int> c = a.Intersect(b).ToList();
                foreach (var item in c)
                {
                    Console.WriteLine(item);
                }

原文地址:https://www.cnblogs.com/LD1018/p/8143729.html