예제 #1
0
 public void Shout()
 {
     Console.WriteLine($"喵~,我是{name}。");
     if (CatShout != null)
     {
         CatShoutEventArgs args = new CatShoutEventArgs();
         args.Name = this.name;
         CatShout(this, args);
     }
 }
예제 #2
0
파일: Mouse.cs 프로젝트: linlvdou/CoreStudy
 public void Run(object sender, CatShoutEventArgs args)
 {
     Console.WriteLine($"老猫{args.Name}来了,{name}快!");
 }