using should provide access to contained namespaces as well as types #3968
Replies: 2 comments 3 replies
-
Note that you can achieve the same by doing: using IO = System.IO; |
Beta Was this translation helpful? Give feedback.
-
Good program organization puts all of the
This is a Visual Studio thing, not a language thing. (Yes, the list of things to display in IntelliSense comes from the language service, but how it's displayed is Visual Studio's responsibility). Visual display of something in the editor isn't really going to be a reason for a language change. The list supports filtering by member type (using the tabs at the bottom of the list). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This issue has been moved from a ticket on Developer Community.
Allow using to do a partial namespace qualification. Currently, you cannot do something like
you have to either do the fully qualified System.IO.Stream in the variable declaration or add an imports with the full System.IO namespace so that you can use Stream as the type name. The former leads to long, cumbersome, namespace qualified names everywhere, and the latter results in a huge blizzard of using statements everywhere, and unwieldy long intellisense lists. There are many cases where one using for one outer namespace will do, and using a single inner namespace name to qualify a type is conveniently terse enough. VB has had this since version 1.0, and it was never a problem. In the case of ambiguity, a fully qualified name would still be required.
Original Comments
Mila Zhou[MSFT] on 9/27/2020, 00:32 AM:
Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.
Beta Was this translation helpful? Give feedback.
All reactions