flip boolean c#

C#
booleanX = !booleanX;
Source

Also in C#: