.Net Basics C# SQL ASP.NET ADO.NET MVC Slides Interview Questions C# Programs Subscribe

Part 2 - How to find the containing namespace of a class

Suggested Videos
Part 1 - How to remove unused using namespaces



In this video we will discuss, how to find the containing namespace of a class.



Some times we know the name of the class that we want to use, but we don't remember the name of the namespace to which the class belong. In visual studio it is easy enough to find the namespace to which a class belong. Simply type the name of the class and then use the following key strokes.
how to find the namespace to which a class belong

how to find the namespace to which a class belong

As you can see in the image above, you will be presented with options to
1. Use the using declaration OR
2. Use the fully qualified namespace OR
3. To generate a class OR
4. To generate a new type

Please note that for this feature to work the following 2 conditions must be met
1. The assembly to which the class belong must be referenced
2. The name of the class is case sensitive


visual studio tips and tricks tutorial