Hi,
I hope this hasn't been asked before.
I have a nullable boolean called boolIsAllowed and a if condition like so:
if(boolIsAllowed.HasValue && boolIsAllowed.Value)
{
//do something
}
My question is this good code or would I be better separating it into a nested if statement? Will the second condition get checked if boolIsAllowed.HasValue is equal to false and then throw an exception?
I hope this question isn't too stupid.
Thanks in advance.