bool
suggest changebool stores the Boolean values true and false. It is an alias of System.Boolean.
The default value of a bool field is false. A local bool must be assigned before it is read.
bool b; // default value is false
b = true; // true
b = ((5 + 2) == 6); // false
To allow null, use bool? (a synonym of Nullable<bool>).
The default value of a bool? field is null.
bool? a = null;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents