B
BLUE
I have a static class, so I've declared all variables static and also the
event.
This is the OnEvent method:
{
if (EventName != null)
{
// Invokes the delegates
EventName(this, e);
}
}
MSDN says it should be declared in this way:
protected virtual void OnEventName(EventNameEventArgs e)
But in a static class I must declare it static: I cannot declare it virtual:
protected static void OnEventName(EventNameEventArgs e)
It's an error or I can declare it in this way?
Thanks, Luigi.
event.
This is the OnEvent method:
{
if (EventName != null)
{
// Invokes the delegates
EventName(this, e);
}
}
MSDN says it should be declared in this way:
protected virtual void OnEventName(EventNameEventArgs e)
But in a static class I must declare it static: I cannot declare it virtual:
protected static void OnEventName(EventNameEventArgs e)
It's an error or I can declare it in this way?
Thanks, Luigi.