Combines two or more neighboring conditionals with identical bodies into a single conditional statement, where each conditional expression is logically OR'd.
This refactoring helps you to eliminate code duplication.
Available from the context menus or via shortcuts:
if (productAExists)
return GetOrders();
│if (productBExists)
return GetOrders();
│If productAExists Then
Return GetOrders()
End If
If productBExists Then
Return GetOrders()
End If
Result:
if (productAExists || productBExists)
return GetOrders();
If productAExists OrElse productBExists Then
Return GetOrders()
End If