public void Shout() { Console.WriteLine("miao,I'm {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("Cat {0} is coming,{1} run", args.Name, name); }