Event Raising in Multithreading Environment

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);
}
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top