dotnet / dotnet/vblang

Proposal: Add Exit If to VB

Open
#431 11 comments 3 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

Will be useful for quick exit and enable to avoid 'iffize' inactive code

First case:

```
...
If x = 0 Then
Dim y = 0
...
If y > 1 Then Exit If
...
End If
```

Here Exit If exits from outer If

Second case:

```
...
If x = 0 Then
...
Exit If
...
...
End If
```

Seems like unnecessary, but this is useful when we want to temporarily avoid some code (potentially problematic) from execution

Current alternative is

```
...
If x = 0 Then
...
If False Then
...
...
End If
End If
```

which require more work and attention

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.