static void Main_1(string[] args) { Composite objA = new Composite("A"); objA.add(new Composite("B")); objA.add(new Composite("C")); objA.Get("B").add(new LeafNode("D")); objA.Get("B").add(new LeafNode("E")); objA.Get("C").add(new LeafNode("F")); objA.display(1); Console.ReadKey(); }
static void Main(string[] args) { Composite comp = new Composite(); comp.Text = "first"; Leaf leaf = new Leaf(); comp.add(leaf); comp.draw(); }