Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我使用
MessageBox.Show(treeView1.SelectedNode.ToString());
结果是TreeNode: Bob。
TreeNode: Bob
Bob没有怎么办TreeNode?
Bob
TreeNode
关闭:
treeView1.SelectedNode.Name
您可能还想检查所选节点是否为空。