H
Hilton
Hi,
Why does:
class A
{
public event EventHandler XYZPressed;
}
class B : A
{
void Bla ()
{
this.XYZPressed (this, EventArgs.Empty)
}
}
give this compiler error:
Error 8 The event 'ABC.DEF.XYZPressed' can only appear on the left hand side
of += or -= (except when used from within the type 'ABC.DEF')
Since B *is* an A (inheritence), you should be able to do this. Right?
This is in VS2003 and VS2005.
Thanks,
Hilton
Why does:
class A
{
public event EventHandler XYZPressed;
}
class B : A
{
void Bla ()
{
this.XYZPressed (this, EventArgs.Empty)
}
}
give this compiler error:
Error 8 The event 'ABC.DEF.XYZPressed' can only appear on the left hand side
of += or -= (except when used from within the type 'ABC.DEF')
Since B *is* an A (inheritence), you should be able to do this. Right?
This is in VS2003 and VS2005.
Thanks,
Hilton