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

Invert Selection

Inverts the selection. The inversion performed depends upon the selected code. There are two variants of inversion:

  • If the selected statement assigns one variable's value to another variable, the code provider will swap these variables.
  • If the selected statement assigns a Boolean value to a variable, the code provider will reverse the Boolean value.

Availability

From the context menus or via shortcuts:

  • when the edit cursor or caret is on a selected statement that assigns one variable's value to another variable.

    Example

    a = b;
    
    a = b
    

    Result:

    b = a;
    
    b = a
    
  • When the edit cursor or caret is on a selected statement that assigns a Boolean value to a variable.

    Example

    c = true;
    
    c = True
    

    Result:

    c = false;
    
    C = False
    
  • When the edit cursor or caret is on a selected For loop.

    Example

    for (int i = 0; i <= 10; i++)
    
    For i = 0 To 10
    

    Result:

    for (int i = 10; i >= 0; i--)
    
    For i = 10 To 0 Step -1