关于一段代码的意思
大概的意思知道,但是具体的不是很明白,希望高手能详细说下谢谢!是关于TreeView的protected string find_brother(string old_path, string curr_path)
{
if (old_path == null || curr_path == null)
return null;
int length = old_path.Length;
int position = 0;
string brother = "";
if (old_path.Contains(curr_path))
brother = curr_path;
else
while (position < length)
{
if (curr_path.Substring(position, 1) == old_path.Substring(position, 1))
{
brother += curr_path.Substring(position, 1);
}
else
break;
position++;
}
position = brother.Length;
while (old_path.Substring(position, 1) != "/")
{
brother += old_path.Substring(position, 1);
position++;
}
return brother;
}
--------------------编程问答-------------------- 顺便问下TreeView里点击一个节点打开其子节点的代码是什么?
是设置OnSelectedNodeChanged的属性吗?
OnSelectedNodeChanged的属性除了在代码里设置,还能在哪里设置呢?
TreeView控件的属性列表里有吗? --------------------编程问答--------------------
节点名称.SelectAction = TreeNodeSelectAction.Expand; --------------------编程问答-------------------- 没人来了吗? --------------------编程问答-------------------- 高手快来呀
补充:.NET技术 , C#