Click here to Skip to main content
15,891,981 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
What are collections?
When do you use collections?
Posted
Updated 13-Jan-11 2:01am
v2

A collection is like a big bag you can put objects into. You can keep them there until you want to look at them, you can count them, and you can go through them one by one. You can have many bags, each with it's own set of objects and keep them all separate.

That's where the analogy breaks down: A collection can hold multiple objects, but an object is not restricted to one collection. You can have the same object in many collections.

See http://msdn.microsoft.com/en-us/library/system.collections(v=vs.71).aspx[^] for more details - there are a lot of different types, and far to many to go into here!
 
Share this answer
 
Comments
Аslam Iqbal 13-Jan-11 8:17am    
i like your ans. 5
fjdiewornncalwe 13-Jan-11 10:22am    
+5. I have saved this response in my "collection" of answers to simple questions that I keep around for mentoring purposes...
OriginalGriff 13-Jan-11 10:28am    
Marcus: :blush:
 
Share this answer
 
I think a reference to a general VB Tutorial[^] is in place here.

Collections are also covered.

Cheers
 
Share this answer
 
Another MSDN VB.NET Collections[^] link.
 
Share this answer
 
Is there any coding for example?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900