Is there a way in Visual Studio (a hotkey) to automatically import a type (or choosing between known namespaces) like the CTRL+O in Eclipse?
+2
A:
When the red caret appears at the end of your member, just hit SHIFT+ALT+F10, then use arrows keys to choose the right option.
controlbreak
2008-10-09 11:53:55
That doesn't automatically add the right 'using' declaration though. Resharper will.
Andrew
2008-10-09 11:54:53
tried and never seen. thnks
Enreeco
2008-10-09 11:56:00
Seems buggy under VB.NET :-/
controlbreak
2008-10-09 12:12:27
+3
A:
Yes, VS.NET Can add the using for you. When you type in a class name, hit CTRL + . and then enter (the first option is 99.99% the right one, so just hit enter). and you can have it add the using at the top of the file for the namespace of that class. I use it all the time.
This is easier than shift alt f10 + enter as its les keys and the . and enter are closer.
mattlant
2008-10-09 11:57:10
Yeah, CTRL + . is shorter - Thanks for the tip. Sounds buggy too in VB.NET
controlbreak
2008-10-09 12:16:19