public void Do() { if (MyEvent != null) { EventPublisherArgs args = new EventPublisherArgs("데이터"); MyEvent(this, args); } }
// 이벤트 메소드 static void doAction(object sender, EventPublisherArgs e) { Console.WriteLine("MyEvnet라는 이벤트 발생"); Console.WriteLine("이벤트 매개변수 : " + e.myEventData); }