Method Name Expected Error

  • Thread starter Thread starter Jeff Johnson
  • Start date Start date
J

Jeff Johnson

I'm getting a Method Name Expected error when I try to compile.

The error happens here:

imgImage.Click += new ImageClickEventHandler(updateColours("X"));


Can someone tell me what I'm doing wrong?

Thanks,

JJ
 
Can someone tell me what I'm doing wrong?

You have a method call in the delegate constructor call, where a
simple method name is expected. Have you tried

imgImage.Click += new ImageClickEventHandler(updateColours);



Mattias
 
Back
Top