SortedList (Dates) with Duplicate Keys

S

ShaneO

VB.NET 2005:

I need to sort an array of Customer details based on transaction dates.
If I use a SortedList the obvious problem is that it does not support
duplicate keys.

Does anyone have a suggestion (or routine) to achieve this type of date
sort?

Thanks in advance for your assistance.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 
G

Guest

ShaneO,

Have your Customer class implement IComaparable and then just use Array.Sort.

Kerry Moorman
 
S

ShaneO

Kerry said:
ShaneO,

Have your Customer class implement IComaparable and then just use Array.Sort.
Excellent! Thank-you for that push in the right direction.

Not having used Array.Sort or IComparable before I wasn't sure of its
implementation, but a quick bit of research has now provided the results
I was seeking.

Thanks again.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 

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

Similar Threads


Top