Which collection class to use?

C

cksj

I'm working on a VB.Net app that has State class (CA, AZ, WA...) and
collection class of State.
Which collection class interface can I use if want to be able to bind the
collection a combo box and at the same time be able to reference the item in
the collection by key?
I know that combo box data source must be an IList but with IList I can't
reference the object with the key.
Can this be done in VB.Net?

Thanks for any ideas,
Cesar
 
M

Marc Butenko

Cesar-

You will want to use the SortedList collection since this allows each item
to have a key for each item.

Hope that helps,
Marc Butenko
(e-mail address removed)
 

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

Top