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 :)
Note: We can import a single missing import using Alt + Enter which shown in the pop-up. To optimize imports (to remove unused imports ) use Ctrl + Alt + O. If for some reason auto-import is not enabled you can go to settings by typing shortcut: Ctrl + Alt + S.
Import to topCtrl+Shift+A a file in explorer → Ctrl+I in your editor tab. or Alt+D a file in explorer to automatically import in editor tab.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With