PC Review


Reply
Thread Tools Rate Thread

How to create a SortedList that allows Duplicate Keys?

 
 
gregory_may
Guest
Posts: n/a
 
      22nd Nov 2004
Anyone know how to create a sorted list with duplicate keys? The sorted
list dies when you try and insert a duplicate key.



 
Reply With Quote
 
 
 
 
Richard Myers
Guest
Posts: n/a
 
      23rd Nov 2004
Hi Gregory

Duplicate keys are not supported by sorted list. It is fairly straightforward to create your own
sorted list though by implementing the IComparable or IComparer interfaces.

http://msdn.microsoft.com/library/de...classtopic.asp

http://msdn.microsoft.com/library/de...classtopic.asp

Richard


 
Reply With Quote
 
gregory_may
Guest
Posts: n/a
 
      23rd Nov 2004
Thanks!

I will have to hunt around for a more meaty example on this topic. Looks
like this is a good place to start.


"Richard Myers" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Gregory
>
> Duplicate keys are not supported by sorted list. It is fairly
> straightforward to create your own
> sorted list though by implementing the IComparable or IComparer
> interfaces.
>
> http://msdn.microsoft.com/library/de...classtopic.asp
>
> http://msdn.microsoft.com/library/de...classtopic.asp
>
> Richard
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SortedList or Dictionary of KEYS ONLY pamela fluente Microsoft C# .NET 8 28th Sep 2007 05:50 PM
SortedList or Dictionary of KEYS ONLY pamela fluente Microsoft VB .NET 8 28th Sep 2007 05:50 PM
SortedList (Dates) with Duplicate Keys ShaneO Microsoft VB .NET 2 22nd Feb 2007 01:27 AM
Case-Insensitive SortedList Keys =?Utf-8?B?QWxleCBNYWdoZW4=?= Microsoft Dot NET Framework 1 9th Jun 2006 08:22 PM
Renumbering keys in a SortedList Pekka Microsoft C# .NET 2 31st May 2005 04:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:27 PM.