Skip to content

Instantly share code, notes, and snippets.

@nicklanng
Created November 5, 2014 11:37
Show Gist options
  • Save nicklanng/ccd1a64947ff106b7539 to your computer and use it in GitHub Desktop.
Save nicklanng/ccd1a64947ff106b7539 to your computer and use it in GitHub Desktop.
Nullable Bools are Dangerous
[TestFixture]
public class NullableBoolsAreDangerous
{
[Test]
public void Test()
{
bool? variable = null;
Assert.IsTrue(variable != true);
Assert.IsFalse(variable == false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment