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

  • Thread starter Thread starter Jason Kendall
  • Start date Start date
J

Jason Kendall

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
(e-mail address removed)
 
Jason,
I would recommend System.Collections.ObjectModel.KeyedCollection(Of K, T).

http://msdn2.microsoft.com/library/ms132438(en-us,vs.80).aspx


NOTE: There are VS 2005 specific forums available at:

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

Hope this helps
Jay

| 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
| (e-mail address removed)
 
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!
 

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