コード例 #1
0
 protected void MyEventCode(PassEventAugument TheAugumentFromUser)
 {
     if (MyEvent != null)
     {
         MyEvent(this, TheAugumentFromUser);
     }
 }
コード例 #2
0
        public void getInput()
        {
            Console.WriteLine("Enter string argument to pass to event:");
            string            AurgentToPassToEvent = Console.ReadLine().ToString();
            PassEventAugument UserAugument         = new PassEventAugument(AurgentToPassToEvent);

            MyEventCode(UserAugument);
        }
コード例 #3
0
        public void MyEventListerner(object source, PassEventAugument e)

        {
            Console.WriteLine("{0} augument was passed", e.passedargument.ToUpper());
            Console.ReadLine();
        }