[C#] 纯文本查看 复制代码 public void print(ID3Tree.TreeNode root)
{
this.TextBox1.Text = "当"+'"' + root.attribute.ToString() + "是"+ '"' ;
if (root.attribute.values != null)
{
for (int i = 0; i < root.attribute.values.Length; i++)
{
this.TextBox1.Text = "当" + '"' + root.attribute.ToString() + "是" + '"' + System.Environment.NewLine + "<" + root.attribute.values[i] + ">";
ID3Tree.TreeNode childNode = root.getChildByBranchName(root.attribute.values[i]);
print(childNode);
}
}
}
怎样式textbox显示所有节点信息,按照图中的编程,只能显示最后一个,怎样做才能显示全部呢,谢谢!!
|