Share via

Using Stream

Sani Love 160 Reputation points
2023-05-15T14:43:11.2633333+00:00

Hello

Using FS As New FileStream(file, FileMode.Open, FileAccess.Read)

vs

Using FS As FileStream = New FileStream(file, FileMode.Open, FileAccess.Read)

Any difference?!

Developer technologies | VB
0 comments No comments

Answer accepted by question author

Viorel 127K Reputation points
2023-05-15T19:13:12.3533333+00:00

It seems that the first variant is a short version, because if you press <Ctrl+.> or <Alt+Enter> on second line, Visual Studio suggests you to simplify it, obtaining the first variant.

There is no difference at run-time.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.