RosettaCodeData/Task/Flow-control-structures/Visual-Basic-.NET/flow-control-structures-5.v...

12 lines
285 B
Plaintext

Function Foo3()
Foo3 = CalculateValue()
If Not MoreWorkNeeded() Then Exit Function
Foo3 = CalculateAnotherValue()
End Function
Function Foo4()
Dim result = CalculateValue()
If Not MoreWorkNeeded() Then Return result
Return CalculateAnotherValue()
End Function