C# Booleans
Very often, in programming, you will need a data type that can only have one of two values, like:
- YES / NO
- ON / OFF
- TRUE / FALSE
For this, C# has a bool
data type, which can take the values true
or false
.
Very often, in programming, you will need a data type that can only have one of two values, like:
For this, C# has a bool
data type, which can take the values true
or false
.