public void Shout() { MessageBox.Show("喵 我是 " + name); if (CatShout != null) { CatShoutEventArgs e = new CatShoutEventArgs(); e.Name = this.name; CatShout(this, e); } }
//public void Run() //{ // MessageBox.Show("老貓來,"+ name + "快跑"); //} public void Run(object sender, CatShoutEventArgs args) { MessageBox.Show("老貓來," + name + "快跑"); }