469,635 Members | 1,966 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,635 developers. It's quick & easy.

Is there a generic type that is similar to the VB6 'Collection' object?

Specifically, I would like a Generic dynamic list that supports
referencing items by Index and by Key. I've looked at List(of T),
System.Collections.Generic.Dictionary(of Key, Value) and others but
don't see anything that fits the bill.

I thought I'd read about an object called a "KeyedCollection" but I
can't find any information on it.

Anyone have a suggestion? Of course, I can build my own, but it'd
sure be nice to have something already built and tested that I can
just inherit to add my own additional bells and whistles.

Thanks so much.
-Jason Kendall
Ja**********@hotmail.com
Nov 21 '05 #1
2 1156
Jason,
I would recommend System.Collections.ObjectModel.KeyedCollection(Of K, T).

http://msdn2.microsoft.com/library/m...us,vs.80).aspx
NOTE: There are VS 2005 specific forums available at:

http://forums.microsoft.com/msdn/

Hope this helps
Jay

"Jason Kendall" <Ja**********@hotmail.com> wrote in message
news:n0********************************@4ax.com...
| Specifically, I would like a Generic dynamic list that supports
| referencing items by Index and by Key. I've looked at List(of T),
| System.Collections.Generic.Dictionary(of Key, Value) and others but
| don't see anything that fits the bill.
|
| I thought I'd read about an object called a "KeyedCollection" but I
| can't find any information on it.
|
| Anyone have a suggestion? Of course, I can build my own, but it'd
| sure be nice to have something already built and tested that I can
| just inherit to add my own additional bells and whistles.
|
| Thanks so much.
|
|
| -Jason Kendall
| Ja**********@hotmail.com
Nov 21 '05 #2
Jay,

I feel so retarded. There's a ton of information out there for the
KeyedCollection you describe. I cannot imagine how I missed it unless
I just mistyped and was too dumb to notice. Thanks for not pointing
out how silly my question must have seemed.

"NOTE: There are VS 2005 specific forums available at:"

Thanks!

On Tue, 5 Jul 2005 13:20:06 -0500, "Jay B. Harlow [MVP - Outlook]"
<Ja************@msn.com> wrote:
Jason,
I would recommend System.Collections.ObjectModel.KeyedCollection(Of K, T).

http://msdn2.microsoft.com/library/m...us,vs.80).aspx
NOTE: There are VS 2005 specific forums available at:

http://forums.microsoft.com/msdn/

Hope this helps
Jay

"Jason Kendall" <Ja**********@hotmail.com> wrote in message
news:n0********************************@4ax.com.. .
| Specifically, I would like a Generic dynamic list that supports
| referencing items by Index and by Key. I've looked at List(of T),
| System.Collections.Generic.Dictionary(of Key, Value) and others but
| don't see anything that fits the bill.
|
| I thought I'd read about an object called a "KeyedCollection" but I
| can't find any information on it.
|
| Anyone have a suggestion? Of course, I can build my own, but it'd
| sure be nice to have something already built and tested that I can
| just inherit to add my own additional bells and whistles.
|
| Thanks so much.
|
|
| -Jason Kendall
| Ja**********@hotmail.com


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Paul Welter | last post: by
8 posts views Thread by JAL | last post: by
reply views Thread by crazyone | last post: by
2 posts views Thread by Angel Mateos | last post: by
5 posts views Thread by Ethan Strauss | last post: by
10 posts views Thread by fig000 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.