Represents a collection of Control objects.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Initializes a new instance of theclass.
Gets the number of elements in the collection.(Inherited from ArrangedElementCollection.)
Gets a value indicating whether the collection is read-only.(Inherited from ArrangedElementCollection.)
Indicates the Control at the specified indexed location in the collection.
Indicates a Control with the specified key in the collection.
Gets the control that owns this.
Adds the specified control to the control collection.
Adds an array of control objects to the collection.
Removes all controls from the collection.
Determines whether the specified control is a member of the collection.
Determines whether thecontains an item with the specified key.
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Searches for controls by their Name property and builds an array of all the controls that match.
Retrieves the index of the specified child control within the control collection.
Retrieves the index of the specified child control within the control collection, and optionally raises an exception if the specified control is not within the control collection.
Retrieves a reference to an enumerator object that is used to iterate over a ArrangedElementCollection.GetEnumerator().).(Overrides
Returns the hash code for this instance.(Inherited from ArrangedElementCollection.)
Retrieves the index of the specified control in the control collection.
Retrieves the index of the first occurrence of the specified item within the collection.
Removes the specified control from the control collection.
Removes a control from the control collection at the specified indexed location.
Removes the child control with the specified key.
Sets the index of the specified child control in the collection to the specified index value.
Returns a string that represents the current object.(Inherited from Object.)
This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.Add.
This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.Remove.
This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see ICloneable.Clone.
Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)
The Add, Remove, and RemoveAt methods enable you to add and remove individual controls from the collection. You can also use the AddRange or Clear methods to add or remove all the controls from the collection.
You can determine if a Control is a member of the collection by passing the control into the Contains method. To get the index value of the location of a Control in the collection, pass the control into the IndexOf method. The collection can be copied into an array by calling the CopyTo method.
The following code example removes a Control from the of the derived class Panel if it is a member of the collection. The example requires that you have created a Panel, a Button, and at least one RadioButton control on a Form. The RadioButton controls are added to the Panel control, and the Panel control added to the Form. When the button is clicked, the radio button named radioButton2 is removed from the .
Available since 1.1
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.