What is the shortcut to auto import library in vis

2020-08-10 07:46发布

问题:

I don't know where is the short-cut button to auto generate namespace import in C# winform/ window store... application, like the Alt+Enter shortcut in NetBean IDE. I and some of my friends have programmed in visual studio for several years but when we need to import library, we have to move the cursor after the Class code and click to show namespace like this:

Thank you for your help :)

回答1:

Try CTRL+. to open up the quick fix which will give you different options to fix such an error, including adding usings for the correct namespace—if VS finds a valid type in the references.