All rules
IDE1005Language rules (null-checking preferences)
Use conditional delegate call
Use conditional delegate call
Microsoft docsDescription
This style rule concerns the use of the null-conditional operator (?.) when invoking a lambda expression, as opposed to performing a null check.
Example
// csharp_style_conditional_delegate_call = true
func?.Invoke(args);
// csharp_style_conditional_delegate_call = false
if (func != null) { func(args); }Configurable options
Vote for the value each option should take in the generated .editorconfig.
csharp_style_conditional_delegate_call default:
trueYour vote
Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0