+ 1
How to use bool variable in C#?
I am completely new to C#, and i don't quite understand how to use the bool variable. Help?
2 Respuestas
+ 3
bool is either true or false.
Like:
bool test = false;
return test;
//Prints false
+ 1
Bool is used a lot in decision making. Together with a if statement.
It is either true or false
You can use it to have variables that are either true or false. Like
IsMale
HasDog
https://code.sololearn.com/c9BkvxhRH3pM/?ref=app