C# 数组去重复,而且减去另一个数组

C# 数组去重复,并且减去另一个数组。
比如我有数组string[] strTPname = new string[]{E,B,B,D,D,A,A,C,C,E,C,B,C,D};
string[] strPname = new string[]{A,B}


怎么先把strTPname 中的重复项去掉,然后再排除掉strPname 中的项,输出一个新数组?

结果是{E,D,C}


先谢谢了
------解决方案--------------------
如果用循环写代码就多了,还是用 LINQ吧:
string[] strTPname = new string[]{"A","A","B","C"};
string[] strPname = new string[] { "B" };
string[] result = strTPname.Distinct().Except(strPname).ToArray();
------解决方案--------------------
引用:
如果用循环写代码就多了,还是用 LINQ吧:
string[] strTPname = new string[]{"A","A","B","C"};
string[] strPname = new string[] { "B" };
string[] result = strTPname.Distinct().Except(strPname).ToArray();


+1
------解决方案--------------------
Linq在集合操作中的优越性是显而易见的。
------解决方案--------------------
linq 正解 ,非常方便