Collapse Conditional (VB)

Converts the selected multi line conditional statement to a single line statement.

Availability

Available from the context menus or via shortcuts:

  • when a multi line conditional statement is selected.

Example

If MyCondition Then
    TestMethod()
End If

Result:

If MyCondition Then TestMethod()

Screenshot

rsCollapseConditional

Note

This refactoring is the functional opposite of Expand Conditional (VB).