Control.ControlCollection.RemoveByKey Method (String)

 

Removes the child control with the specified key.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual void RemoveByKey(
	string key
)

Parameters

key
Type: System.String

The name of the child control to remove.

The Name property of a Control corresponds to the key for a Control in the Control.ControlCollection.

.NET Framework
Available since 2.0
Return to top
Show: