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: 11-6-2015 22:03:04
  • Language: C#
  • Type: C#
  • Views: 2140

Double click on the code to select all.

 

;