本文共 399 字,大约阅读时间需要 1 分钟。
static List list = new List() { 1,2,4,"a","b"}; static List list1 = new List() { 1, 2, 3,"a","c" }; static void Main(string[] args) { list1.RemoveAll(it => list.Contains(it)); foreach (Object i in list1) { Console.WriteLine(i); } Console.ReadKey();
转载于:https://www.cnblogs.com/lijianhong90/p/11235885.html