I have a database query which will either return NULL or a boolean (bit) value.
NULL
I wish to store this value in a variable of type Nullable<
Nullable<
You could write value as bool?. This will return null if value is not of type bool.
value as bool?
null
value
bool
Note that this is somewhat inefficient.