TechBubbles Microsoft Technology BLOG

Visual Studio 2010 Tips and Tricks

This post discusses about tips and tricks in Visual Studio 2010 which helps developers to write the code faster and make their life easier in day to day work much better. Especially you need these tips when you are concurrently working on two many projects.

Let us group these tips and tricks

1. IntelliSense

  • Filtering

IntelliSense options are filtered in Visual Studio 2010 let us take an example when you are typing the list will filter with the words you type

image

this feature is not available in earlier versions. It is not only matching the prefixes but also matches the substrings as shown below

image

You can notice when you type Line then you will get ReadLine and WriteLine.

  • Suggestion Mode

Example: some times when you try to type a member which is not at declared then IDE shows something as below

image

notice when type Wait which is not yet declared in project but Visual Studio shows something else suggesting which I am not interested. To turn off the suggestion mode just type (CTRL + ALT + SPACE) then it would not display the above suggestion option

  • Undeclared Types after new key word

You can create an object for a type which is not yet existed in your project as shown below. Later you can create that type

image

notice when you type Wait  and new key word then Wait type will appear in the list.

Many of you may end up running multiple Visual Studio instances, following are tips to navigate using key board which increase the speed of your navigation. some of them are related windows 7 but when you merge with Visual Studio it works really well

image

Notice I have three applications opened on task bar. If you want to bring Visual Studio up Windows + 2, Now hit Windows + 3 notepad will open

Now If I do Windows + ALT + 3 then I will get the jump list as shown below

image

using the jump list you can create new instances of notepads. you all know ALT + TAB allows you to navigate between the open instances…..

To get the new instance of application after pinning  use Windows + Shift + N

There much faster way you can navigate between open windows by using

Windows + T

image

2. Code Editor Tricks

To zoom your code editor or make your font code bigger user CTRL + SHIFT + >

and for smaller size CTRL + SHIFT + <

Box Selection – You can select the set of words in box and type your change automatically all words will change.

let us see an example

image

select the fields which you want to change and type all the values in selection will change with this feature in VS 2010.

Highlight References – Ctrl + Shift + Up/Down more about this can be read here

Call Hierarchy

If you want find the reference of type in your code then Key board short cut is

image

CTRL + K , CTRL + T

You can side by side view the code of reference type using the above feature

image

Find All References

Shift + F12

image

Collapsing the regions

CTRL + MM

Go to Definition F12

Go to Definition stack Ctrl + Shift + 7/8

To launch the Navigate to window  CTRL + ,

image

Activate the open file, When you have got so many files opened VS editor then use Ctrl + Alt + Down

image

Format Document now available for CSS file (CTRL + K, D)

You can use VS 2010 to open the online templates project new dialogue box

image

Smart Tags – CTRL + . and press to enter to add this name space in using statement

image

Reference: Teched 2011 presentation

More tips I can share in next post

Share this post :

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

1 Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud