Example #1
0
 public static void Show()
 {
     Console.WriteLine("*****************************");
     Student student = new Student()
     {
         Id   = 191,
         Name = "候鸟"
     };
     {
         iPhone phone = new iPhone();
         student.PlayiPhone(phone);
         student.PlayPhone(phone);
     }
     {
         Lumia phone = new Lumia();
         student.PlayLumia(phone);
         student.PlayPhone(phone);
     }
     {
         Honor phone = new Honor();
         student.PlayHonor(phone);
         student.PlayPhone(phone);
     }
     {
         Mi phone = new Mi();
         //student.PlayHonor(phone);
         student.PlayPhone(phone);
     }
 }
Example #2
0
 public void PlayHonor(Honor phone)
 {
     Console.WriteLine("这里是{0}", this.Name);
     phone.Call();
     phone.Text();
 }