We pay for user submitted tutorials and articles that we publish. Anyone can send in a contributionLearn More
Since we got so many comments with lots of useful information on our Visual Studio Shortcuts post we decided to use those comments and some other shortcuts we found and compile another list so lets get going
CTRL + "K" + "M": This one is Genius.
Incase you need to add a method to an
already existing class you just write the method
as if it exists :
1: int i = 5;
2: bool flag = NewMethod(i);
Click on the shortcut and you will get the
following method stub:
1: private bool NewMethod(int i)
3: throw new NotImplementedException();
Great isn’t it?
1: int i = 5;
2: bool flag = DifferentClass.NewMethod(i);
Put the cursor on the new method, click the shortcut and you will see this:
1: public class c
3: internal bool NewMethod(int i)
5: throw new NotImplementedException();
Definitely my favorite.
CTRL + "-" and CTRL + SHIFT + "-": These two are similar to the Forward and Backwards buttons of the WebBrowsers and will take you to all the places your curser was, Very useful for those times you click F12 to go to definitions and then have no clue where you were before :). (Thanks Vijay Santhanam).
ALT + ENTER: We talked about it in the last post, but it seems that this shortcut will open the properties window on anything that moves, even Files in your Windows Explorer. (Thanks to Bryan Migliorisi from http://www.Migliorisi.com).
SHIFT + ALT + ENTER: This one will switch you Visual Studio to Full Screen mode, which is very useful in those boring presentation when you have to show your code through a projector on a screen. Another click will get you back to normal mode. (Thanks to Pablo Marambio).
CTRL + "M" + "M": This one will collapse the region your cursor is at whether its a method, namespace or whatever for collapsing code blocks, regions and methods. The first will collapse only the block/method or region your cursor is at while the second will collapse the entire region you are at. (Thanks to knave).
CTRL + ALT + "P": This will open up the attach to process window, very useful for debugging. (Thanks Greg Beech from http://gregbeech.com).
F8 and SHIFT + F8: These two are great! they are similar to the shortcut number 3 but they will take you forward and backwards in your search results just search for something and then start hitting F8 and you will see. (Thanks to David Hu).
CTRL + SHIFT + "B": This one will invoke build solution. ( Thanks to Matt Brunell).
CTRL + "B" + "T": This one will allow you to quickly add or remove a bookmark from a line of code.
Truly some great and helpful shortcuts. Thanks to everyone who commented, and looking forward to hearing what else you have.
Tags :ALTBackCRTLENTERF8ForwardFull ScreenKeyboardPropertiesSHIFTShortcutstoolsVisual Studio
Copyright © 2012 Dev102.com
Breeze : Designed by Amit Raz and Nitzan Kupererd