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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top