+ 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?

9th Apr 2019, 1:57 PM
ŠœŠøŠ»Š°Š½ ŠšŠ¾Š²Š°Ń‡ŠµŠ²Šøћ
ŠœŠøŠ»Š°Š½ ŠšŠ¾Š²Š°Ń‡ŠµŠ²Šøћ - avatar
2 Answers
+ 3
bool is either true or false. Like: bool test = false; return test; //Prints false
9th Apr 2019, 2:58 PM
Aykut SaraƧ
Aykut SaraƧ - avatar
+ 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
9th Apr 2019, 2:57 PM
sneeze
sneeze - avatar