public static void PreOrderTraversal <T>(this TreeNode <T> node, Action <TreeNode <T> > action) { TraverseTree.PreOrderTraversal(node, n => n.ChildNodes, action); }
public static void PreOrderTraversal <T>(this BinaryTreeNode <T> node, Action <BinaryTreeNode <T> > action) { TraverseTree.PreOrderTraversal(node, n => new [] { n.Left, n.Right }, action); }