toggle for bool

    public static bool toggle(this bool value)
    {
         return !value;
    }
Example:
bool variavel = true;
variavel = variavel.toggle(); // false

Description

Toggle to bool

Details

  • Author: Luã Govinda
  • Submitted on: 6/11/2015 10:03:04 PM
  • Language: C#
  • Type: C#
  • Views: 1227

Double click on the code to select all.

 

;