I want to create an class that represents an integer set using a HashSet<int>
. I want it to keep track of which values are included in the set using that internal container. I've done this so far:
class SetInteger
{
HashSet<int> intTest= new HashSet<int>();
intTest.Add(1);
intTest.Add(2);
intTest.Add(3);
intTest.Add(4);
intTest.Add(5);
intTest.Add(6);
intTest.Add(7);
intTest.Add(8);
intTest.Add(9);
intTest.Add(10);
}
So, here I think I'm adding some values to the HashSet
, but I dont see how this can keep track of which values that are included in the set. Any ideas?