se non ho capito male... un modo potrebbe essere questo.
classe TreePrinter
codice:
public class TreePrinter
{
private BinaryTree _tree;
public TreePrinter(BinaryTree tree)
{
this._tree = tree;
}
public void Print()
{
//stampa il tree
}
}
metodo Print in BinaryTree
codice:
public void Print()
{
TreePrinter printer = new TreePrinter(this);
printer.Print();
}
P.S.
personalmente questa inizializzazione:
TreePrinter printer = new TreePrinter(this);
la considero uno smell: funzionalità in una classe esterna che dovrebbe stare invece dentro la classe corrente.