Created
December 13, 2019 17:48
-
-
Save jaredpar/a0835afc71139284c09bfda203d8c011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
static class Program | |
{ | |
static void Main(string[] args) | |
{ | |
bool b = GetTricksyBool(); | |
if (b) Console.WriteLine(b.IsTrue()); | |
} | |
static bool IsTrue(this bool b) | |
{ | |
bool bTrue = true; | |
bool bFalse = false;; | |
if (b == bTrue) | |
{ | |
return true; | |
} | |
else if (b == bFalse) | |
{ | |
return false; | |
} | |
else | |
{ | |
return !true && !false; | |
} | |
} | |
static unsafe bool GetTricksyBool() | |
{ | |
bool b = true; | |
byte* p = (byte*)(&b); | |
*p = 2; | |
return b; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to print this and hang it from the office wall.