Method Name Expected Error

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
 
M

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top