public void CatCry() { CatCryEventArgs args = new CatCryEventArgs(name); Console.WriteLine(args); // 在内部触发事件 CatCryEvent(this,args); }
private void CatCryEventHandler(object sender,CatCryEventArgs e) { Console.WriteLine("{0}醒了:我勒个去,叫个锤子!",name); }