Ahmadreza's Notes

On Software Development

Posts Tagged ‘VS 2008

Visual Studio trick: Adding namespace

A few days ago I saw a clip of PDC 2008 about MVC .Net which is great concept. It was performed by Phil Haack. In this video Phil shows a trick of Visual studio which is very useful.

Most of the time during application development you want use a class which its name space has not been included. Guess what should you do? Oh yes ! You should type name space completely or leave current line and go to top of class adding appropriate "using" statement get back to your line of code. Surprisingly there is a trick in visual studio 2008 (I tested in visual studio 2008). If reference of class included in project you can Type class name completely at the same time a tooltip bar will be appeared under your class name. At the same time press Ctrl+. (dot). A menu will be appeared which offers you two options. First option will add using statement at the top of code class file. Second option will insert full class name including name space.

kick it on DotNetKicks.com

Advertisements

Written by Ahmadreza Atighechi

May 20, 2009 at 5:17 am

Posted in Blog

Tagged with