That does not work. As soon as you return 0 from the comparer, it will throw "duplicate" exception.
You don't need classes encapsulation or anything, just make a comparer that does not return 0 (equal) result. Here is an example for int
type of key
class MyComparer : IComparer
{
public int Compare(int x, int y)
{
if (x < y)
return -1;
else return 1;
}
}