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