R
Rainer Queck
Hi,
in a base class I have declared the following event handler:
public abstract class MyBaseClass : :MarshalByRefObject
{
.....
public event EventHandler OnMsgSent;
....
}
In a derived class I try to call this event in the following way:
public override void MsgSent()
{
if(OnMsgSent != null)
{
GbMessageEventArgs e = new GbMessageEventArgs(this);
e.InfoString = "Message was successfully sent!";
OnMsgSent(this,e);
}
}
but when I trie to compile this, I get the following error message:
"The event ,<my namespace>.<base class>.OnMsgSent' can only appear on the
left hand side of += ...."
What is it I am doing wrong?
Thanks for hints.
Rainer
in a base class I have declared the following event handler:
public abstract class MyBaseClass : :MarshalByRefObject
{
.....
public event EventHandler OnMsgSent;
....
}
In a derived class I try to call this event in the following way:
public override void MsgSent()
{
if(OnMsgSent != null)
{
GbMessageEventArgs e = new GbMessageEventArgs(this);
e.InfoString = "Message was successfully sent!";
OnMsgSent(this,e);
}
}
but when I trie to compile this, I get the following error message:
"The event ,<my namespace>.<base class>.OnMsgSent' can only appear on the
left hand side of += ...."
What is it I am doing wrong?
Thanks for hints.
Rainer