Is C#'s null-conditional delegate invocation thread safe? [duplicate]
问题 This question already has answers here : Checking for null before event dispatching… thread safe? (6 answers) Closed 6 hours ago . This is how I have always written event raisers; for example PropertyChanged: public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged(string name) { var handler = PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(name)); } In the latest Visual Studio, however, the light bulb thingamabob suggested