-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Missing using for Stream and StreamReader variables #8559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The WebClient variable has a using Using client As New WebClient() These were missing the using: Ref data As Stream = client.OpenRead(args(0)) Ref reader As New StreamReader(data) The order of Close for reader.Close and data.Close was reversed.
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Learn Build status updates of commit 2f5d4b2: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
End Using need for VB.net
|
Learn Build status updates of commit 623f146: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
BillWagner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @softwarepronto
I like this as well.
Let's make this change consistent with the corresponding C# sample PR. Then, it's ready to ![]()
snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientUserAgent/VB/useragent.vb
Outdated
Show resolved
Hide resolved
snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientUserAgent/VB/useragent.vb
Outdated
Show resolved
Hide resolved
BillWagner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After adding the two suggestions, this LGTM.
|
Learn Build status updates of commit 695087d: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
Summary
The WebClient variable has a using
Using client As New WebClient()
These were missing the using:
Ref data As Stream = client.OpenRead(args(0))
Ref reader As New StreamReader(data)
The order of Close for reader.Close and data.Close was reversed.
Fixes #Issue_Number (if available)