The requested page is not available for the requested platform. You are viewing the content for Default platform.

Invert Selection

Purpose

Inverts the code elements. The supported inversions are listed below:

  • Boolean literal (truefalse)
  • Equality operator (==!=)
  • Addition/substraction assignment (a += ba -= b)
  • Assignment (a = bb = a)
  • For-loop direction [for (int i = 0; i <= a.Length; i++)for (int i = a.Length; i > 0; i--)]

Availability

Available when the selection includes one or more supported code elements.

Usage

  1. Select one or more supported code elements.
  2. Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.
  3. Select Invert Selection from the menu.

Refact_InvertSel

After execution, the Code Provider inverts all supported code elements in the selection as shown in the Purpose section.