I write unity codes in VS 2015, which means it\'s in c#4 and the null condition operator is not available.
Before invoking a delegate, I did a null check. However the co
Before invoking a delegate, I did a null check. However the codes are greyed out. Does it mean the grey codes are not effective just like comments?
It means that the Visual Studio pre-compiler/design-time-compiler detects the statement is most likely not needed.
If so what should I do to prevent invoking a null delegate?
Nothing, the compiler will still determine at compile time (and actually at run-time as well) if the statement is needed.