Control.ControlCollection.Find(String, Boolean) Méthode

Définition

Recherche les contrôles par leur Name propriété et génère un tableau de tous les contrôles qui correspondent.

public:
 cli::array <System::Windows::Forms::Control ^> ^ Find(System::String ^ key, bool searchAllChildren);
public System.Windows.Forms.Control[] Find(string key, bool searchAllChildren);
member this.Find : string * bool -> System.Windows.Forms.Control[]
Public Function Find (key As String, searchAllChildren As Boolean) As Control()

Paramètres

key
String

Clé à localiser dans le Control.ControlCollection.

searchAllChildren
Boolean

true pour rechercher tous les contrôles enfants ; sinon, false.

Retours

Tableau de type Control contenant les contrôles correspondants.

Exceptions

key est null ou la chaîne vide («  »).

S’applique à