Exemple #1
0
        static void Main(string[] args)
        {
            var parent = new Person { FirstName = "taro", LastName = "tanaka" };
            var child = new Person { FirstName = "jiro" };

            parent.AddChild(child);

            Console.WriteLine("{0} {1}", parent.LastName, parent.FirstName);
            Console.WriteLine("{0} {1}", child.LastName, child.FirstName);
        }
Exemple #2
0
 public void AddChild(Person child)
 {
     this.AddLogicalChild(child);
 }