Install Theory and .NET

Recently, I came across a situation where set theory and mathematics corresponded to what I did with writing (provided that there is an easier way to accomplish what I need, i.e. LINQ), but I did not think about it at that time). However, I was not aware of any common library sets. Provided by IEnumerables provide some specified operations (Union, etc.), but do not look like intersection or comparison. Can anyone point out what fits here? Something that implements math using a generic type?

+6
ienumerable set-theory
source share
2 answers

In the structure (3.5+), there is a HashSet<T> that does what you need..NET 4 also introduced SortedSet<T> and the common interface ISet<T> .

+6
source share

System.Collections.Generic.HashSet has a number of predefined operations, including Subset, Superset, Intersection, Union, etc.

http://msdn.microsoft.com/en-us/library/bb359438.aspx

I hope this helps

Joe

+1
source share

All Articles