问题
Is it possible to make Visual Studio list all classes, and not just the ones from the imported namespaces? The only way I know of auto-importing types this way is to type in the class name exactly right, then right-click and import. Something like Eclipse, which can list all available classes as you are typing.
回答1:
Not sure about Intellisense.
There's always the Object Browser.
回答2:
As mentioned here: Is it possible for Intellisense to search for classes in unimported namespaces like in Eclipse?
You may use the IntelliSense Extender Plugin. For Visual Studio 2017:
https://marketplace.visualstudio.com/items?itemName=Dreamescaper.IntelliSenseExtender
And for VS 2019:
https://marketplace.visualstudio.com/items?itemName=Dreamescaper.IntellisenseExtender2019
It includes the types of all projects in the solution and of all referenced packages. Selecting an not imported type from IntelliSense will then auto import that type.
来源:https://stackoverflow.com/questions/5698814/visual-studio-intellisense-class-suggestion