Why Bool Type in C# cannot operate Logical Operations? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why Bool Type in C# cannot operate Logical Operations?

Because Bool type can only have two conditions either true or false so we cannot write false>true or false==true

31st Mar 2018, 6:33 AM
Kisa Batool
1 Answer
+ 1
operators in c# for comparison: && - and || - or == - equals != - does not equal ! - not all of these work with booleans and other logical expressions
31st Mar 2018, 8:21 AM
hinanawi
hinanawi - avatar