日期:2014-05-17 浏览次数:21071 次
static UFD searchfather(string fathername,UFD rootnode)
{//递归地寻找以home为根的name为fathername的节点
//如何打断for()递归
if (rootnode.name == fathername && rootnode.childUFD.Count < rootnode.childUFDcount)// && isGo==true)
{
return rootnode;
}
else
{
for (int i = 0; i < rootnode.childUFDcount; i++)
{
searchfather(fathername, (rootnode.childUFD[i]) as UFD);
}
}
return null;
}