Snippet: conditional operator (equal to null)

property value
IDE VS Code
Language C#
Title conditional operator (equal to null)
Shortcut con
Description conditional operator with condition whether the expression is equal to null

Placeholders

Identifier Tooltip Default Value
expression Expression to evaluate x
false False expression false
true True expression true

Code

(x == null) ? true : false