cs0070.cs 495 B

123456789101112131415161718192021222324252627282930
  1. // cs0070.cs : The event 'Click' can only appear on the left-side of a += or -= (except when used from within the type 'Button')
  2. // Line : 20
  3. using System;
  4. public delegate void EventHandler (int i, int j);
  5. public class Button {
  6. public event EventHandler Click;
  7. }
  8. public class Blah {
  9. Button Button1 = new Button ();
  10. public void Connect ()
  11. {
  12. Button1.Click = new EventHandler (Button1_Click);
  13. }
  14. public void Button1_Click (int i, int j)
  15. {
  16. }
  17. public static void Main ()
  18. {
  19. }
  20. }