lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 15
What is the output of the following code snippet?
bool? a = false; bool? b = null; Console.WriteLine(a & b);
A. False
B. True
C. Null
Using | and & operators with the bool? type
The results of these operators are listed in the following table: true & null = null; true | null = true; false & null = false; false | null = null; null & null = null; null | null = null.
Links:
The AND Operator
Using Nullable Types
Using Nullable Types
Boolean Data Type