toggle for bool
Toggle to bool
Source
public static bool toggle(this bool value)
{
return !value;
}
Example
bool variavel = true;
variavel = variavel.toggle(); // false
ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Toggle to bool
public static bool toggle(this bool value)
{
return !value;
}
bool variavel = true;
variavel = variavel.toggle(); // false