---
title: "C#里的List----linq的集合运算"
author: "run_wang"
date: "2012-06-28T10:53:36Z"
tags: []
categories: ["编程语言"]
slug: "c-list-linq"
draft: false
lastmod: "2012-06-28T10:54:25Z"
id: 1569741
url: "https://run-wang.iteye.com/blog/1569741"
---

<span style="color:blue">linq的集合运算有
set1.Intersect(set2);//交集
set1.Except(set2);//差集A-B
set1.Union(set2);//并集去重复
set1.Concat(set2);//类似并集不去重复
union连接不同的集合，自动过滤相同项(即是将两个集合进行合并操作，过滤相同的项)
如果要连接(即不过虑相同项)用Concat</span>