/// <summary> /// Gets the .ToString() representation of the node's ancestors. /// </summary> public string[] GetPathForNode(SharpTreeNode node) { if (node == null) return null; List<string> path = new List<string>(); while (node.Parent != null) { path.Add(node.ToString()); node = node.Parent; } path.Reverse(); return path.ToArray(); }