Using Collections

A collection is a list of objects that have been constructed from the same object class and that share the same parent object. The collection object always contains the name of the object type with the Collection suffix. For example, to access the columns in a specified table, use the ColumnCollection object type. It contains all the Column objects that belong to the same Table object.

The Microsoft Visual Basic For...Each statement or the Microsoft Visual C# foreach statement can be used to iterate through each member of the collection.

See Also

Tasks

How to: Reference an Object by Using a Collection in Visual Basic .NET
How to: Iterate Through the Members of a Collection in Visual Basic .NET

Help and Information

Getting SQL Server 2005 Assistance