Determine the relative complement of two IEnumerable<T> sets in .NET
- by SFun28
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#.