I find the usings remove and sort ability to be highly useful, but does anyone know of a tool that will scan my code looking for unrecognized types, look through available namespaces, and offer me possible listings to use?
+2
A:
You do know about the shortcut key: Shft+Alt+F10 when the cursor is on the unrecognized type? Or if you are a mouse user I believe there is a dropdown...
J.13.L
2009-06-09 22:23:09
+2
A:
Visual Studio will do that with assemblies that your project has references to. Use a type whose namespace isn't already included, but is available via the referenced assemblies. If you mouseover it, you'll get a little popup in the bottom, left corner of the symbol. That will let you automatically pull in the appropriate using.
I use this all the time with the CLSCompliantAttribute
in AssemblyInfo.cs
b/c System
isn't available there by default. I also find myself pulling in System.Diagnostics
this way pretty frequently when I find I need to add a trace to a bit of code.
Greg D
2009-06-09 22:23:37