Beispiel #1
0
 public void Shout()
 {
     Console.WriteLine($"喵~,我是{name}。");
     if (CatShout != null)
     {
         CatShoutEventArgs args = new CatShoutEventArgs();
         args.Name = this.name;
         CatShout(this, args);
     }
 }
Beispiel #2
0
 public void Run(object sender, CatShoutEventArgs args)
 {
     Console.WriteLine($"老猫{args.Name}来了,{name}快!");
 }