Guest User

Untitled

a guest
Jul 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. class ButtonClickInfo
  2. {
  3. public int x, y;
  4. public ButtonClickInfo(int x, int y)
  5. {
  6. this.x = x; this.y = y;
  7. }
  8. }
  9. class Program
  10. {
  11. delegate void OnClickDelegate(ButtonClickInfo e);
  12. static void OnClick(ButtonClickInfo e)
  13. {
  14. Console.WriteLine(e.x + "," + e.y);
  15. }
  16. static void Main(string[] args)
  17. {
  18. OnClickDelegate handler = OnClick;
  19. handler(new ButtonClickInfo(123, 321));
  20. Console.ReadLine();
  21. }
  22. }
Add Comment
Please, Sign In to add comment