Пример #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            people        peo = new people();
            englishPeople eng = new englishPeople(peo);
            chinaPeople   chi = new chinaPeople(peo);

            peo.Greate("张三", "english");
            peo.Greate("张三", "china");
            Console.ReadKey();
        }
Пример #2
0
 public chinaPeople(people p)
 {
     pe          = p;
     pe.eGreate += GreateChina;
 }
Пример #3
0
 public englishPeople(people p)
 {
     pe          = p;
     pe.eGreate += GreateEng;
 }