Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / July 2007

Tip: Looking for answers? Try searching our database.

SortedList<T> missing GetByIndex method?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bruce Wood - 20 Jul 2007 04:59 GMT
Sorry if this is a repost. My original post appears to have
disappeared.

Is it just me, or is the generic SortedList<T> missing a GetByIndex
method. The old (non-generic) SortedList has a method that, given an
index into the sorted list, will return the value of the item at that
index.

The new SortedList<T> has methods to get the index into the list of a
value, and another methdo to get the index into the list of a key
(just as SortedList had). However, there appears to be no method that
allows you to use that index for anything.

Was this an oversight? Or perhaps it was a conscious decision on the
part of the framework designers? Or have I missed something?
Peter Duniho - 20 Jul 2007 05:38 GMT
> Sorry if this is a repost. My original post appears to have
> disappeared.

Your original post did make it, and I answered it.  You should be able to  
see it in your newsreader, but if you can't and aren't able to figure out  
how to fix your newsreader to show it, I recommend using Google Groups as  
a better alternative to starting a whole new thread, at least for the  
purpose of finding your original post and any possible replies.
Bruce Wood - 21 Jul 2007 03:20 GMT
On Jul 19, 9:38 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:

> > Sorry if this is a repost. My original post appears to have
> > disappeared.
[quoted text clipped - 4 lines]
> a better alternative to starting a whole new thread, at least for the  
> purpose of finding your original post and any possible replies.

Thanks. I can now (strangely) see my original post and your reply.

I do use Google Groups, but for some reason when I logged in a day
after my original post, I couldn't see it, and couldn't find it when I
searched for it. Now I can. Weird.

Thank you again for your answer. I wouldn't have thought of indexing
into the Values array.
Jon Skeet [C# MVP] - 21 Jul 2007 08:09 GMT
> Thanks. I can now (strangely) see my original post and your reply.
>
> I do use Google Groups, but for some reason when I logged in a day
> after my original post, I couldn't see it, and couldn't find it when I
> searched for it. Now I can. Weird.

Google groups had an odd couple of days last week - they were about a
day behind for a while. Seems to be okay now.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.