public IEnumerable <string> EnumerateFiles() { foreach (string File in Files) { yield return(File); } foreach (TreeNode ChildNode in ChildNodes.Values) { foreach (string ChildFile in ChildNode.EnumerateFiles()) { yield return(ChildFile); } } }