class TreeNode
{
public TreeNode Parent{get;set;}
public List<TreeNode > ChildrenNodes{get;set;}
public string Name{get;set;}
public string Text{get;set;}
public string GetFullPath()
{
string path=Text;
var node=this.Parent;
while(node!=null)
{
path=node.Text+”->”+path;
node=node.Parent;
}
return path;
}
}