SortedList

  • Thread starter Thread starter Vai2000
  • Start date Start date
V

Vai2000

Hi All, Is there a way to custom sort the SortedList by its value...I know
how to do with keys by passing a special Comparable Class...but how do I
sort it based on Values?


TIA
 
The SortedList sorts on the keys. If you have to sort on what you are
putting into the value, I suppose you could use the value as the key: For
example:

sortedList.Add(myValue, myValue);

Is there a reason that you have to sort on the value and have a different
key?
 
Back
Top