I have two SortedSets:
SortedSet<SortedSet<int>> sset1 = new SortedSet<SortedSet<int>>();
SortedSet<SortedSet<int>> sset2 = new SortedSet<SortedSet<int>>();
Later on I check I make a new Sorted set:
SortedSet<int> newSset = MethodThatReturnsSortedSet();
Now I want to check if sset1 and sset2 contain newSset:
if (!sset1.Contains(newSset) && !sset2.Contains(newSset)) <--error on this line
{
sset1.Add(next);
//some more code
}
So the error I get is Argument Exception, "at least one of these objects must implement IComparable.
I have looked at other questions with the same problem, but in their case they want to compare their own classes. I am just checking if a certain item is in a Set. So yea..I have no idea how to solve this, any pointers?