Sorted List \w Duplicates

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have a class whose objects I need to sort. There are up to 100k objects. The value to sort the objects is being calculated and accessible through a property. Now here is the issue. It is possible that two objects will return the same value (which is the key for the sorted class). How can I get a sorted list that allows duplicate keys? Are there any solutions out there?<br/><br/>Btw, here is how it would look:<br/>class C{<br/> Double x,y;<br/> public Double Value {set; get return f(x,y);}<br/> ...<br/>}<br/>SortedList sl = ...;<br/>C c1 = ...;<br/>sl.Add(c1.Values, c1);

View the full article
 
Back
Top