Compress/Expand Assignment
#Purpose
Converts an assignment to its short form or expands the short form assignment to a full assignment expression. Short form assignments are more compact and clearer than the full expressions.
#Availability
Available when the caret is at the beginning of a compressible assignment expression or a short form assignment.
#Usage
Place the caret at the beginning of a compressible or expandable assignment expression.
Note
The blinking cursor shows the caret’s position at which the Refactoring is available.
- Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.
- Select Compress Assignment from the menu (Expand Assignment if you are expanding the short form assignment).
After execution, the Refactoring converts the assignment to its short form or vice versa.