
ColorDialog Class | 203
The Language
Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Collection.Remove Method
Class
Microsoft.VisualBasic.Collection
Syntax
objectVariable.Remove(index)
objectvariable (required; Collection)
The instance of a
Collection from which an item is to be removed
index (required; Integer or String)
Either the 1-based ordinal position (
Integer) or the unique key (String) of an item
in the collection
Description
The Remove method removes an item from a collection based on its position or its
unique key.
Usage at a Glance
• Members of the collection that follow the removed member are automatically
moved by one ordinal position; no gaps are left in the collection. This also means
that the ordinal positions of many members may change during a deletion.
• If you are deleting multiple members of a collection by numeric index value, you
should delete them backwards—from highest index value to lowest—since the
collection is reindexed after each deletion.
• The Clear method of the
Collection class removes all items immediately.
Version Differences
Visual Basic 2005 adds support for generics to several collection-style classes. Generics
are discussed in Chapter 10.
See Also
Collection Class, Collection.Add Method, Collection.Count Property, Collection.Item
Property
ColorDialog Class
Namespace
System.Windows.Forms
Creatable
Yes ...