Collections 
Author Message
 Collections

Has anybody got an example of doing an old style collection (where you add
and take off objects) in VB.NET?

Thanks

Lee



Sat, 31 May 2003 06:26:49 GMT  
 Collections
The easiest is to just use Microsoft.VisualBasic.......Collection

The right way would be to either use ArrayList or implement
TypedCollectionBase.

--
Jonathan Allen


Quote:
> Has anybody got an example of doing an old style collection (where you add
> and take off objects) in VB.NET?

> Thanks

> Lee



Sat, 31 May 2003 08:54:24 GMT  
 Collections

You use the ArrayList class instead, in the System.Collections namespace.
Other than the fact that it is zero-based, it is quite analogous.
The only other kicker is that it returns elements of type Object and you have to
use CType to cast them to the type you expect.



Sat, 31 May 2003 21:50:05 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Collections, Collections and More Collections

2. Document collections and AllForms collections

3. Creating a CDO collection from an Outlook collection

4. using collection of collections

5. Storing a collection in a collection

6. collection in collection

7. Migrating to System.Collections.IEnumerator from VB6.Collection

8. Persisting a Collection of a Collection

9. Collection of Collections?

10. Collections, swapping items in a collection

11. Collections of Collections..how?

12. collections of collections

 

 
Powered by phpBB® Forum Software