Reverse ?? operator

Posted by HeavyWave on Stack Overflow See other posts from Stack Overflow or by HeavyWave
Published on 2010-04-13T05:37:02Z Indexed on 2010/04/13 5:42 UTC
Read the original article Hit count: 390

Filed under:

Is it possible to do something like this in C#?

logger != null ? logger.Log(message) : ; // do nothing if null

or

logger !?? logger.Log(message); // do only if not null

© Stack Overflow or respective owner

Related posts about c#