Determine the relative complement of two IEnumerable<T> sets in .NET

Posted by SFun28 on Stack Overflow See other posts from Stack Overflow or by SFun28
Published on 2010-06-02T18:59:59Z Indexed on 2010/06/02 19:14 UTC
Read the original article Hit count: 371

Filed under:
|
|
|
|

Is there an easy way to get the relative complement of two sets? Perhaps using LINQ?

I have to find the relative compliment of a set A relative to B. Both A and B are of type HashSet<T> but I think the algorithm could be made more general (IEnumerable<T> or even ISet<T>)?

I could use a solution in either VB.NET or C#.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET