Clearing a collection 
Author Message
 Clearing a collection

Is there a simple way to clear all the elements in a collection class?

I don't want to delete each element manually but I guess I will if I
have to.

Thanks,

Benny

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Fri, 04 Jan 2002 03:00:00 GMT  
 Clearing a collection
Set it to Nothing and then re-create it.  Its overkill maybe but it
is simple to do.

Set oCollection = Nothing
Set oCollection = New Collection


Quote:

> Is there a simple way to clear all the elements in a collection class?

> I don't want to delete each element manually but I guess I will if I
> have to.

> Thanks,

> Benny

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Fri, 04 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How can i clear the MSHFLEXGRID without CLEAR - Como limpar a GRID sem usar CLEAR

2. Clearing DAO error collection

3. Overriding Clear() for a Collection Class

4. Clearing the Command Objects Parameter Collection for re-use

5. Clear method and collection

6. Clearing the Command Objects Parameter Collection for re-use

7. Bookmark collection with DataGrid control not cleared

8. Clear collection of all members?

9. Collections, Collections and More Collections

10. Listview1.listitems.clear does not clear

11. how to clear pers hist lists like clear docs

12. How to clear a sprite without clearing all the sprites from a picturebox

 

 
Powered by phpBB® Forum Software