You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the add open code fixer will place an open statement at the top of the containing scope you are working in. There is a setting to place the statement at the top of the file. The tradeoff is thus:
At top
Not at top
Benefit
Can use symbols from that namesspace anywhere else in the file
Separates namespaces by scope (e.g., module), which some people may prefer
Drawback
Could be seen as polluting the top of the file
Cannot access that namespace outside of the scope it was opened in
So I think the root question is, do people generally prefer open statements at the top of a file, or would they prefer tooling to always try to hide them in the scope in which the symbol was used?
The text was updated successfully, but these errors were encountered:
The change of the default has been merged and is in the nightly feed. We have a lot of runway between now and VS 2019 RTW to collect any feedback. I'll leave this issue open until then.
I'd prefer that the open is placed at its nearest neighbor, in the top of top of the file. That way, people that have their opens similar to csharp, I.e system on top, and alphabetical, don't have to edit manually each time this fix is applied.
Currently, the add open code fixer will place an open statement at the top of the containing scope you are working in. There is a setting to place the statement at the top of the file. The tradeoff is thus:
So I think the root question is, do people generally prefer
open
statements at the top of a file, or would they prefer tooling to always try to hide them in the scope in which the symbol was used?The text was updated successfully, but these errors were encountered: