On the subject of favourites
I thought I'd share this little nugget with you that I got from a customer recently.
CTRL+K, CTRL+D (press one combination immediately followed by the other)
Not the easiest shortcut to remember but worth the investment - it reformats your code according to your preferences.
I used to achieve this by deleting and re-inserting closing braces '}' which causes the same event. Now I can do it without leaping about my source file. And the *best* thing about this keyboard shortcut is that it works in most file types! Yes! Including .xaml and .aspx.
What's your favourite little-known tip for Visual Studio?
26 May 2009
» Next Post:
ViewModels and CheckListBoxes
« Previous Post:
My favourite underused keyword in C# is...
Comments are closed for this post.
26 May 2009
Notice that you can also use Ctrl+K,Ctrl+F in many cases to format just the selected text.
27 May 2009
Ctrl+M, Ctrl+O - collapse all regions
Ctrl+. - open smart tag (for automatic namespace adding for example)
Ctrl+Up/Down - scroll code
12 Jun 2009
My favourite shortcut is this...http://www.microsoft.com/downloads/details.aspx?familyid=E5F902A8-5BB5-4CC6-907E-472809749973&displaylang=en
28 Jun 2009
A new one for me was Ctrl+M, Ctrl+L which expands all the folded code in a file.
Funny that both this post and the c# readonly post talk about stuff that is very natural and prevalent if you use Resharper.