Add Else Statement
Adds the else block to the conditional.
Available when the cursor is on an if statement that does not have corresponding else block.
Place the caret on an if block that has no else block.
The blinking cursor shows the caret's position at which the Code Provider is available.
- Use 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.