0
What are Boolean Operators below i didn't understand it in C#
bool IsOpen = true ;
2 Answers
+ 2
Here,
bool IsOpen = true ;
Means " IsOpen is a boolean type variable and assigned true value ". Boolean variables can hold either true or false values only..
In C#, boolean operators results in a boolean value only..
The logical operators, ( &, |, !, &&,|| ) and conditional operators( >, <, !=, ==, ..... ) are results in boolean values after it's evaluation.
+ 1
Caution, Jayakrishna đźđł, in c# bitwise operators (&, |) are not classified as Boolean operators.
Boolean operators are meant to operate on Boolean operands and return a True/False result, whereas bitwise operators operate on integral values and return an integral result.