Adding and Resolving Namespaces using Shortcut key in Visual Studio

By | January 25, 2011

This is one of the frequent requirement in visual studio either adding new namespaces corresponding to a class or resolving the namespaces. If you are adding a new class in your code then you may need to add the correspondence namespaces. To do it, you may either manually type the Using Namespace or you just right click on the class name and select Resolve > Namespace. But using “Ctrl+.” you can automatically add the namespace in your code. Lets consider you want to add DataTable in your code, so for that you right click on that class and select resolve to resolve the namespace. 1

Using “Ctrl+.” you can also automatically add the using statement as shown in below

2

Fig : Add namespace using Shortcut key

One thought on “Adding and Resolving Namespaces using Shortcut key in Visual Studio

  1. Pingback: Dew Drop – January 26, 2011 | Alvin Ashcraft's Morning Dew

Comments are closed.