代理人またはイベントの呼び出しに使用できる?.
演算子は、競合条件を回避しますか?競合状態を避ける?演算子
例:手動で競合状態を避ける:
//The event-invoking method that derived classes can override.
protected virtual void OnShapeChanged(ShapeEventArgs e)
{
// Make a temporary copy of the event to avoid possibility of
// a race condition if the last subscriber unsubscribes
// immediately after the null check and before the event is raised.
EventHandler<ShapeEventArgs> handler = ShapeChanged;
if (handler != null)
{
handler(this, e);
}
}
ソース:msdn
はいを評価します。 https://codeblog.jonskeet.uk/2015/01/30/clean-event-handlers-invocation-with-c-6/ – vcsjones