Get a list of all tree nodes (in all levels) in TreeView Controls

后端 未结 8 1693
故里飘歌
故里飘歌 2020-12-06 11:53

How can I get a list of all tree nodes (in all levels) in a TreeView control?

8条回答
  •  忘掉有多难
    2020-12-06 12:18

    Update to Krumelur's answer (replace 2 first lines of his/her solution with this):

    foreach ( var node in oYourTreeView.Nodes )
    {
        PrintNodesRecursive( node );
    }
    

提交回复
热议问题