Just before I have to implement my own.. I don't suppose the .NET
framework has an equivalent of the STL set_difference algorithm
yet...?
For e.g. If I have two containers: CompareSet={1,2,3} ToSet={2,3,4}
then diff(CompareSet,ToSet) = {4} and diff(ToSet,CompareSet) = {1}
Thanks,
Duncan
> Just before I have to implement my own.. I don't suppose the .NET
> framework has an equivalent of the STL set_difference algorithm
> yet...?
>
> For e.g. If I have two containers: CompareSet={1,2,3} ToSet={2,3,4}
> then diff(CompareSet,ToSet) = {4} and diff(ToSet,CompareSet) = {1}
The framework doesn't have the concept of a Set class. However, there
is on codeproject a set of classes (no pun intended <g>) at
http://www.codeproject.com/csharp/Types_Set.asp that you may be able
to modify to suit your needs.
Duncan Smith - 14 Sep 2007 14:24 GMT
> > Just before I have to implement my own.. I don't suppose the .NET
> > framework has an equivalent of the STL set_difference algorithm
[quoted text clipped - 6 lines]
> is on codeproject a set of classes (no pun intended <g>) athttp://www.codeproject.com/csharp/Types_Set.aspthat you may be able
> to modify to suit your needs.
Thanks, a moment ago I just found out about Wintellect Power
Collections - looks like exactly what I was after.
Regards,
Duncan
Nicholas Paldino [.NET/C# MVP] - 14 Sep 2007 15:53 GMT
It doesn't have a concept of a Set class, YET. .NET 3.5 (in beta now)
has a HashSet class which actually implements this logic for you, and will
be in the next release.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>> Just before I have to implement my own.. I don't suppose the .NET
>> framework has an equivalent of the STL set_difference algorithm
[quoted text clipped - 7 lines]
> http://www.codeproject.com/csharp/Types_Set.asp that you may be able
> to modify to suit your needs.