System.Web.UI.WebControls.TreeView.FindNodeByPos C# (CSharp) Method

FindNodeByPos() private method

private FindNodeByPos ( string path ) : System.Web.UI.WebControls.TreeNode
path string
return System.Web.UI.WebControls.TreeNode
		TreeNode FindNodeByPos (string path)
		{
			string[] indexes = path.Split ('_');
			TreeNode node = null;
			
			foreach (string index in indexes) {
				int i = int.Parse (index);
				if (node == null) {
					if (i >= Nodes.Count) return null;
					node = Nodes [i];
				} else {
					if (i >= node.ChildNodes.Count) return null;
					node = node.ChildNodes [i];
				}
			}
			return node;
		}