Add Else Statement
Purpose
Adds the else block to the conditional.
Availability
Available when the cursor is on an if statement that does not have corresponding else block.
Usage
Place the caret on an if block that has no else block.
Note
The blinking cursor shows the caret’s position at which the Code Provider is available.
- Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.
- Select Add Else Statement from the menu.
After execution, the Code Provider adds the else block to the conditional.