- using System.Linq;
- List<string> ListA = new List<string>();
- List<string> ListB = new List<string>();
- List<string> ListResult = new List<string>();
- ListResult = ListA.Distinct().ToList();//去重
- ListResult = ListA.Except(ListB).ToList();//差集
- ListResult= ListA.Union(ListB).ToList(); //并集
- ListResult = ListA.Intersect(ListB).ToList();//交集
来源:http://blog.csdn.net/joyhen/article/details/39578325