コード例 #1
0
        public void InvokeAll()
        {
            MyEvent1(this, EventArgs.Empty);
            MyEvent2.Invoke(this, EventArgs.Empty);
            MyEvent3.DynamicInvoke(this, EventArgs.Empty);
            MyEvent4.BeginInvoke(this, EventArgs.Empty, null, null);
            this.MyEvent5(this, EventArgs.Empty);
            MyEvent6?.Invoke(this, EventArgs.Empty);

            MyAction1(this, EventArgs.Empty);
            MyAction2.Invoke(this, EventArgs.Empty);
            MyAction3.DynamicInvoke(this, EventArgs.Empty);
            MyAction4.BeginInvoke(this, EventArgs.Empty, null, null);
            this.MyAction5(this, EventArgs.Empty);
            MyAction6?.Invoke(this, EventArgs.Empty);
        }
コード例 #2
0
 public void TransferClick2()
 {
     MyEvent2?.Invoke(this, new MyEventArgs {
         Param = DateTime.Today.DayOfWeek
     });                                                                               // to simulate the click at View
 }