Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recursive: See recursive
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01083365
Message ID:
01083728
Vues:
10
Rick,
I don't see how I can accomplish what I want without the bool return value.
Your example will always recurse through all nodes in the tree (please correct me if I am wrong because I find recursion very mind bogling).

Einar

>And you can even avoid the boolean return value if you want to:
>
>
>
>private void button2_Click(object sender, System.EventArgs e)
>{
>  RecursiveMethod(oTree.Nodes[0]);
>}
>
>private void RecursiveMethod(TreeNode treeNode)
>{
>  if(treeNode.Nodes.Count>0)
>     foreach(TreeNode n in treeNode.Nodes)
>        RecursiveMethod(n);
>  else
>     MessageBox.Show(treeNode.Text);
>}
>
>
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform