Guest User

Untitled

a guest
Aug 19th, 2019
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class TrueEvent
  2. {
  3. public event EventHandler CustomEvent;
  4.  
  5.  
  6. public void Method()
  7. {
  8. OnEvent();
  9. }
  10.  
  11. private void OnEvent()
  12. {
  13. if (CustomEvent != null)
  14. {
  15. CustomEvent(this, EventArgs.Empty);
  16. }
  17. }
  18. }
  19.  
  20. Events.OnReceivePlaneData += test;
  21.  
  22. TrueEvent trueEvent = new TrueEvent();
  23. trueEvent.CustomEvent += new EventHandler(myObject_MyEvent);
RAW Paste Data