publicintvalue; public TreeNode leftNode; public TreeNode rightNode;
///<summary> /// 构造函数 ///</summary> ///<param name="x"></param> publicTreeNode(int x) { value = x; int leftvalue = x * 10; int rightvalue = x + 1; if (leftvalue <= Globalvalue) { leftNode = new TreeNode(leftvalue); }
if (rightvalue <= Globalvalue && rightvalue % 10 != 0) { rightNode = new TreeNode(rightvalue); } } }