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


Fig : Add namespace using Shortcut key

Author: Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

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.