Hello!
Before I get to my question, let me say I am new to C#, but have an extensive
VB.NET background.
I have a Button. I am trying to add an event handler to it in normal WinForms statements. When I do this, I receive the following error:
CS0029: Cannotimplicitly convert type 'System.EventHandler' to 'System.EventHandler<System.EventArgs>'
Here are samples of the code I am writing with, that are giving me such errors:
Form1.eto.cs:
cancelButton.Click += new EventHandler(cancelButton_Click); 'This line gives me the error.
Form1.cs: private void cancelButton_Click(Object sender, EventArgs e)
{
}
I'm not sure what I'm doing wrong. Any suggestions?