По памяти коечто и сам намудрил, как то так))Вопрос тогда поставлю так.
Вот код(очень бредово?) как сделать метод Add?
using System;
namespace ClassLibrary
{
public class BinaryTree
{
public BinaryTree Left;
public BinaryTree Right;
public BinaryTree Parent;
public string value;
public BinaryTree()
{
Left = null;
Right = null;
Parent = null;
value = null;
}
public void Print(BinaryTree r)
{
if (r == null) return;
Print(r.Left);
if (r.value != null)
{
Console.Write(" " + r.value + " ");
}
Print(r.Right);
}
public void Print()
{
Print(this);
}
public void Add(string s)
{
BinaryTree t = new BinaryTree();
this = t;
t.Parent = this;
t.value = s;
}
}
}