public IEnumerable <LcrsTrie> AllNodesDepthFirst() { yield return(this); if (LeftChild != null) { foreach (var node in LeftChild.AllNodesDepthFirst()) { yield return(node); } } if (RightSibling != null) { foreach (var node in RightSibling.AllNodesDepthFirst()) { yield return(node); } } }