protected void MyEventCode(PassEventAugument TheAugumentFromUser) { if (MyEvent != null) { MyEvent(this, TheAugumentFromUser); } }
public void getInput() { Console.WriteLine("Enter string argument to pass to event:"); string AurgentToPassToEvent = Console.ReadLine().ToString(); PassEventAugument UserAugument = new PassEventAugument(AurgentToPassToEvent); MyEventCode(UserAugument); }
public void MyEventListerner(object source, PassEventAugument e) { Console.WriteLine("{0} augument was passed", e.passedargument.ToUpper()); Console.ReadLine(); }