Value type - bool
suggest change// default value of boolean is false
bool b;
//default value of nullable boolean is null
bool? z;
b = true;
if (b) {
Console.WriteLine("Boolean has true value");
}
The bool keyword is an alias of System.Boolean. It is used to declare variables to store the Boolean values, true
and false
.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents