The following code snippet was highlighted in Visual Studio alongside a suggestion for simplifying it.
if ( drawMethodsDelegate != null )
drawMethodsDelegate ( e.Graphics );
When I clicked on the lightbulb suggestion thing, Visual Studio refactored it into the following
drawMethodsDelegate?.Invoke ( e.Graphics );
And no. The question mark is not a typo. I don't understand what the question mark is used for and I can't find anything relevant on MSDN. I also looked at the Tutorial Point Delegates page but found no useful information.
Tutorial Point page , MSDN Delegates page , MSDN Control.Invoke page