jrliv
5/29/2017 - 10:27 PM

Using the negation operator to return the opposite value of a Boolean expression.

Using the negation operator to return the opposite value of a Boolean expression.

bool compare = !(7 == 5);

Console.WriteLine("Is 7 equal to 5?: " + compare);	// True
Console.WriteLine("The opposite of True is: " + !true);	// False