I\'ve been reading about overloading true and false in C#, and I think I understand the basic difference between this and defining a bool operator. The example I see around is
I had no idea these operators existed. That means you can implement the self-negation paradox:
public class ThisClassIsFalse
{
public static bool operator true(ThisClassIsFalse statement)
{
return statement ? false : true;
}
public static bool operator false(ThisClassIsFalse statement)
{
return statement ? true : false;
}
}
So now we know the true solution to this classic paradox... StackOverflowException.