473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Which collection class to use?

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
Jul 21 '05 #1
2 1503
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
mb******@bresnan.net

"cksj" <ck*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #2
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
mb******@bresnan.net

"cksj" <ck*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sayoyo | last post by:
Hi Guys, I have to implement a design in Java which is a collection class gathers several units of the same class. I was thinking about two ways to implement it. the first is to create two...
4
by: Saso Zagoranski | last post by:
Hi! I need an array-type of collection when the entries would look like: object myObject, int myInt, string myString Which collection should I use? I know I could declare a multidimensional...
5
by: Oberon | last post by:
I want to create a collection of records which will be permanently available at the application level in an ASP.NET application. How should I go about that? Lets say that the record structure...
1
by: cksj | last post by:
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...
13
by: Scott Meddows | last post by:
I'm writing an NT service to provide security information enterprise wide. I would like to have all of this information cached memory if a previous request loaded it into memory. Then using a...
4
by: mflll | last post by:
I am looking into the different techniques of handling arrays of edit boxes in Java Script. The first program below works fine. However, are there better ways of doing this, where the person...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
6
by: Arthur Dent | last post by:
How do you sort a generic collection derived from System.Collections.ObjectModel.Collection? Thanks in advance, - Arthur Dent
13
by: Dog Ears | last post by:
I've got a windows form that monitors the status of employees it polls a database every 2 seconds to fetch updates then update a underlying dataset bound to a grid using Invoke to marshal to the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.