Consider rewriting this:
if (this.ErrorOccurred != null)
{
this.ErrorOccurred(this, e);
}
Into:
var handler = ErrorOccurred;
if (handler != null)
{
handler(this, e);
}
Comments: ** Comment from web user: GeertvanHorrik **
if (this.ErrorOccurred != null)
{
this.ErrorOccurred(this, e);
}
Into:
var handler = ErrorOccurred;
if (handler != null)
{
handler(this, e);
}
Comments: ** Comment from web user: GeertvanHorrik **
No need to lock it. Just storing it in a handler is enough.