コードインスペクション:'EventArgs.Empty' を使用する
このインスペクションは、共有インスタンスである EventArgs.Empty を使用できる場合でも、 new EventArgs() を報告します。 これにより、不要なリソース割り当てを回避し、意図をより明確に表現できます。
サンプル
E?.Invoke(this, new EventArgs());
E?.Invoke(this, EventArgs.Empty);
クイックフィックス
new EventArgs() を EventArgs.Empty に置き換えます。
2026 年 6 月 12 日