Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 733179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:13:38+00:00 2026-05-14T07:13:38+00:00

In the list of Visual C# 2010 Breaking Changes there is an entry on

  • 0

In the list of Visual C# 2010 Breaking Changes there is an entry on “Event synchronization” which states that you must now create a local copy of a delegate to check for null (before calling it) in order to avoid a race condition. Wasn’t this already the “best practice” pattern anyhow?

Does this change make any difference in the StackOverflow discussion on C# Events and Thread Safety?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:13:38+00:00Added an answer on May 14, 2026 at 7:13 am

    Well, you didn’t have to take a copy if you used exactly the code they’d got there – because it was locking on this. However:

    • locking on this is a bad idea to start with
    • holding a lock while you execute event handlers is generally a bad idea

    So code which was already bad practice is now actively broken. Ho hum. The normal implementation of events (which doesn’t hold a lock but does copy the variable) isn’t changed by this.

    See the Chris Burrows blog post about event best practices for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking through the achievement list for Visual Studio 2010, it says that there is
In Visual Studio 2010, how do you create a report using a List returned
I'm using MySQL connector in my Visual Studio 2010 Professional project which requires changes
In Visual Studio 2010, I could list my tests by full name. That way,
Is there a setting in Visual Studio 2010 that will generate comments for the
Is there an equivalent of the Visual Studio Task List in MS Access? I'd
There is a list for GCC; is there a similar list for Visual Studio
Is it possible to have the Visual Studio 2010 Start Page show a list
I have a method: static void FileChangesDetected(List<ChangedFiles> files) I used Visual Studio 2010 and
I'm developing a web application in visual studio 2010. I've a list view and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.