Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help With Collections

Status
Not open for further replies.

RWild

Programmer
Nov 14, 2003
53
US
Topic Title. I just don't seem to get them. Would anybody be able to explain them to me.

Thanks.

-R.Wild
 
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(n)} 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.

DotNetDoc
M.C.S.D.
---------------------------------------

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.
 
Actually ArrayLists and Hashtables are both Collections. They both implement the ICollection inteface.

There are two types of collections

Those the implement the IList interface. These use Indexers.

Array
ArrayList
Stack
Queue

And those that implement the IDictionay interface. These use a key/value pair.

HashTable
ListDictionary
HybridDictionary
SortedList






DotNetDoc
M.C.S.D.
---------------------------------------

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
 
I would like to thank you all for help once again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top