dotnet / dotnet/vblang

Inline assignment inside while statement

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

Description

Moved from https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/5804781-inline-assignment-inside-while-statement?tracking_code=b8ad6215b353994f320715a0d9ee7569

I think VB developers miss the inline assignment inside while clause feature, which is already exist in c#
its great if we can find the equivalent for this in VB

```csharp
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0)
{
// Use the data you've read
}
```

will be

```vb
While (bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0
' Use the data you've read
End While
```

I know the VB uses = as equality operator inside while, but while VB uses the same operator for assignment, perhaps we can find a proper solution for this

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.