- With Visual Studio 2010 there is a new feature available called “Resolve”.
- Using “Resolve”, you can automatically add using statements to a class.
- Shortcut key to invoke this is => Press Ctrl key and “.” key and automatically the namespace will be added.
- Shown below in this picture, when we enter “DataSet” and if we press “Ctrl” and “.” keys it automatically shows all the namespaces which have the “Data Set” class.
- We can move up and down using arrow keys to select the right namespace and then if we click enter, that using statement is automatically added to our using section at the top – “How cool !”
- Follow my blog for more tips and tricks like this
1 comment:
Good one. One thing to add is that this only works if your VS project includes a reference to that namespace. Otherwise you will need to go to References and add that namespace (for example, System.Management) manually before it works.
Post a Comment