The error message stated in the title of the question is displayed if a
boolean
value is assigned instead of an
Event handler
. For example, the
Click
event of a
Button
can be handled by assigning the
Event handler button1_Click
as explainere here
http://msdn.microsoft.com/en-us/library/dfty2w4e(v=vs.80).aspx[
^]
button1.Click += new EventHandler(button1_Click);
where
button1_Click
is declared as below
private void button1_Click(object sender, System.EventArgs e)
{
}
In the above code if a boolean value is assigned like
button1.Click += variableOfBoolValue;
where
variableOfBoolValue
is a variable containing a
boolean
value, then the above error is thrown. To avoid that error assign a
Event handler
of appropriate type corresponding to the
event
which is to be handled.
I think this is what can be inferred with the minimum info provided in the question.