C# winfrom 递归(城市名)
2021-04-25 18:35
标签:+= style color data list ext view substr state 递归的定以:递归在运行过程中,自己调用自己的过程; 把点击的城市,show出来: C# winfrom 递归(城市名) 标签:+= style color data list ext view substr state 原文地址:http://www.cnblogs.com/xinchenhui/p/7918984.htmlList
string tname = "";
getData(treeView1.SelectedNode);
MessageBox.Show(tname.Substring(0, tname.Length - 1));
public void getData(TreeNode tn)
{
if (tn.Parent != null)
{
getData(tn.Parent);
}
tname += tn.Text + "|";
}
文章标题:C# winfrom 递归(城市名)
文章链接:http://soscw.com/index.php/essay/79468.html