Archive for January, 2008

Nullable types and boolean comparisons

I’ve begun studying to take the 70-536 exam. I read about Nullable types in my study material and decided to review MSDN’s topic on the subject. The documentation includes a complicated truth table regarding tri-state boolean logic.

Here’s how I think of it, without having to worry about looking up the value in a large truth table.

And comparisons:

  • True: Both operators are true
  • False: Either operator is false
  • Nothing/Null: Any other combination.

Or comparisons:

  • True: Either operator is true
  • False: Both operators are false
  • Nothing/Null: Any other combination.

2 Comments

Follow

Get every new post delivered to your Inbox.