public void Remote(BoTree <T> node) { if (nodes.Contains(node)) { nodes.Remove(node); } }
public void AddNote(BoTree <T> node) { if (!nodes.Contains(node)) { node.parent = this; nodes.Add(node); end = node.end; } }
static void Main(string[] args) { BoTree <Student> tree1 = new BoTree <Student>(); tree1.Data = new Student("Nature", "Man", 22); BoTree <Student> tree2 = new BoTree <Student>(new Student("Bob", "Man", 12)); tree1.AddNote(tree2); tree1.end.ToString(); }