//------------------------------------------------- // Finds the Descendent Node specified by Path // The first character of the Path serves as the Path Delimiter // "\aaa" will Find the Child Node whose Key is "aaa" // "/aaa/bbb" will Find the Child "aaa" and return its Child Keyed "bbb" // "\" or "" will return This Node public GenericNode <T> FindPath(string Path_in) { if ((string.IsNullOrEmpty(Path_in))) { return(this); } string[] rgKeys = Path_in.Split(Path_in[0]); //string[] rgKeys = Converting.String2StringArray(Path_in, Path_in.Substring(0, 1), true); GenericNode <T> nodeChild = this; GenericNode <T> nodeNext = null; for (int ndx = 0; ndx <= (rgKeys.Length - 1); ndx++) { nodeNext = nodeChild.FindChildNode(rgKeys[ndx]); if ((nodeNext == null)) { return(null); } nodeNext = nodeChild; } return(nodeChild); }