How to define nullable bool property in C#?
You typically use a nullable value type when you need to represent the undefined value of an underlying value type. For example, a Boolean, or bool , variable can only be either true or false . However, in some applications a variable value can be undefined or missing.
How do you check if a boolean is nullable?
Turns out, you can just do this instead: bool? nullableBool = true; if (nullableBool == true) // some code... nullableBool == true will evaluate to false if nullableBool is either false or null , in other words: not true.