I created a windows control. I need to define the event for a button
in it at the time i use it in apllications. I used the code below:
public event MouseEventHandl er OkClick
{
add
{
button1.Click += value;
}
remove
{
button1.Click -= (MouseEventHand ler)value;
}
}
But it is giving error that 'EverHadler' type cannot be implicitly
converted to 'MouseEventHand ler'. Can someone tell me how to do it?
in it at the time i use it in apllications. I used the code below:
public event MouseEventHandl er OkClick
{
add
{
button1.Click += value;
}
remove
{
button1.Click -= (MouseEventHand ler)value;
}
}
But it is giving error that 'EverHadler' type cannot be implicitly
converted to 'MouseEventHand ler'. Can someone tell me how to do it?
Comment