SyntaxFix
Write A Post
Hire A Developer
Questions
The complete way would be:
bool b1; bool? b2 = ???; if (b2.HasValue) b1 = b2.Value;
Or you can test for specific values using
bool b3 = (b2 == true); // b2 is true, not false or null