In C# is there any real difference (other than syntax) under the hood between:
myButton.Click += new EventHandler(myMemberMethod);
and
myButton.Click += myMemberMethod;
?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The second method is a shortcut to the first one, it was introduced in C# 2.0
See also this thread.