A collection is like an array that you don't have to index. Do you understand how a listbox or a dropdown works?
If so, then think of the collection like an in-memory listbox. You can add to it, remove from it using a key.
That's an excellent way to think of it, bigfoot... actually it's how I've come to understand it myself.
I like collections better than arrays because they can grow without much coding. You teach the program how to add one item, and then you just reuse that method. You can reference them like an array {.item} and they're really handy. Actually, the VB help files in VS.NET have a great walkthrough for creating a collection class for a specific type of object. Might look it up for more info, if you haven't already.
Ben
A programmer was drowning. Lots of people watched but did nothing. They couldn't understand why he yelled "F1!"
Explaining Collections is a little out of the range of what you can post here. The post would be too large. I have a few videos that go over the subject ( They are free of course). I use them as additional material with my VB.net Class. Let me know if you are interested and I can get them to you.
Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
Also remember that there are ArrayLists and Hashtables that are not quite collections, but a bit more advanced than arrays. They come in very handy as well.
Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.