TreeNode nd = treeView1.SelectedNode; if (nd != null) { MessageBox.Show(nd.Nodes.Count.ToString()); }