Esempio n. 1
0
        public event EventHandler <MyTCEventArgs> Elapsed; // Event declaration

        private void OnOneSecond(object obj, EventArgs e)
        {
            if (Elapsed != null)
            {
                MyTCEventArgs mtcea =
                    new MyTCEventArgs("Message from OnOneSecond");
                Elapsed(obj, mtcea);
            }
        }
Esempio n. 2
0
 public void TimerHandlerA(object obj, MyTCEventArgs e)
 {
     Console.WriteLine("Class A Message: {0}", e.Message);
 }