TreeNodeCollection.Find(String, Boolean) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Recherche les nœuds d’arborescence avec la clé spécifiée, éventuellement en recherchant des sous-nœuds.
public:
cli::array <System::Windows::Forms::TreeNode ^> ^ Find(System::String ^ key, bool searchAllChildren);
public System.Windows.Forms.TreeNode[] Find(string key, bool searchAllChildren);
member this.Find : string * bool -> System.Windows.Forms.TreeNode[]
Public Function Find (key As String, searchAllChildren As Boolean) As TreeNode()
Paramètres
- key
- String
Nom du nœud d’arborescence à rechercher.
- searchAllChildren
- Boolean
true pour rechercher des nœuds enfants de nœuds d’arborescence ; sinon, false.
Retours
Tableau d’objets TreeNode dont Name la propriété correspond à la clé spécifiée.
Exceptions
.NET 5 et versions ultérieures : key est null ou vide.
Remarques
La Name propriété correspond à la clé d’un TreeNode dans le TreeNodeCollection.
La comparaison clé n’est pas sensible à la casse. Si le key paramètre est ou une chaîne vide ou qu’il n’y null a aucune correspondance, la Item[] propriété retourne un tableau vide.