Invert boolean
This refactoring aims to flip the value of a Boolean variable and all its usages from True to False and vice versa.
Before | After |
---|---|
|
|
Place the caret at the name of a Boolean variable.
Go to Refactor | Invert Boolean.
In the dialog that opens, click Preview to view the suggested changes in the Find tool window, or Refactor to invert the detected occurrences silently.