rjmurillo / EffectiveCSharp.Analyzers

Many of the recommendations in the book Effective C#: 50 Specific Ways to Improve Your C# can be validated by Roslyn-based analyzers and code fixes.
MIT License
2 stars 1 forks source link

Item 8: Use the Null Conditional Operator for Event Invocations #33

Closed rjmurillo closed 2 months ago

rjmurillo commented 2 months ago

https://github.com/BillWagner/EffectiveCSharpAnalyzers/issues/8

Summary

This feature request aims to enhance the code analyzer library by adding a rule that enforces the use of the null conditional operator (?.) for event invocations in C# code. This will help developers avoid NullReferenceExceptions and ensure thread-safe event handling.

Goals