Event Raising in Multithreading Environment

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any difference between following codes.

public event EventHandler Click

when Raise this event:
if(Click != null)
Click(this, EventArgs.Empty);

or

if(Click != null)
{
EventHandler temp = Click;
temp(this, EventArgs.Empty);
}
 
The second version is longer.

--
HTH,

Kevin Spencer
Microsoft MVP
Ministry of Software Development
http://unclechutney.blogspot.com

I just flew in from Chicago with
a man with a wooden leg named Smith
who shot an elephant in my pajamas.
So I bit him.
 
Back
Top