給TreeNode添加屬性,可它本身自帶屬性沒有了
private class TreeNode
{
private string n_name;
public string TreeNode_name
{
get{return n_name;}
set{n_name = value;}
}
}
tn = new TreeNode();
tn.只有TreeNode_name,其他TreeNode屬性呢?請教
[解决办法]
private class TreeNode : TreeNode //需要指定命名空間
{
private string n_name;
public string TreeNode_name
{
get{return n_name;}
set{n_name = value;}
}
}
[解决办法]
你要扩展 TreeNode 吗?
public class XTreeNode : System.Web.UI.WebControls.TreeNode
{
// your properties
// ...
}