Converts nested if-else blocks into a single switch (Select) statement or vice versa. It is recommended to use the switch statement when the selector is discrete. On the other hand, if you need to check continuous ranges, you should use the if-else cascade. The manual conversion between these two approaches requires a lot of formatting work, which can be done automatically by this Refactoring.
Place the caret on the if statement that has a corresponding else block.
The blinking cursor shows the caret's position at which the Refactoring is available.
After execution, the Refactoring converts the nested sequence of conditionals into a single switch (Select) statement or vice versa.