I\'ve read and searched and I\'m yet to figure out an answer to this relatively simple issue.
I have a class:
public class AccessibleTreeItem
{
publ
public class AccessibleTreeItem
{
public string name;
public List children;
public AccessibleTreeItem()
{
children = new List();
}
public static AccessibleTreeItem Find(AccessibleTreeItem node, string name)
{
if (node == null)
return null;
if (node.name == name)
return node;
foreach (var child in node.children)
{
var found = Find(child, name);
if (found != null)
return found;
}
return null;
}
}