This documentation is archived and is not being maintained.

ComponentCollection Class

Provides a read-only container for a collection of IComponent objects.

For a list of all members of this type, see ComponentCollection Members.


[Visual Basic]
Public Class ComponentCollection
   Inherits ReadOnlyCollectionBase
public class ComponentCollection : ReadOnlyCollectionBase
public __gc class ComponentCollection : public
class ComponentCollection extends ReadOnlyCollectionBase

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


This collection inherits from ReadOnlyCollectionBase. The only way to add IComponent objects to this collection is to use the class constructor.

This collection provides two indexer properties, a string indexer and an integer indexer. The string indexer property returns a component in the collection if it is sited and the Name property of its Site property matches the specified string. The integer indexer property returns the IComponent at the specified collection index. The CopyTo method copies the contents of the collection to a specified array, beginning writing to the array at the specified index.


Namespace: System.ComponentModel

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System (in System.dll)

See Also

ComponentCollection Members | System.ComponentModel Namespace | IComponent