Visual Studio Tricks


Visual Studio (2005,2008,2010) Tips and Tricks.


#34 Cut and Paste Collapsed code in Visual Studio

Outlining is a very popular feature of Visual Studio. Outlining is the [+] sign you see in Visual Studio on the left margin that lets your collapse and expand code. What happens if you select 3 visual lines of code, and the middle line of code is acutally a collapsed region? Watch this video to find out :)

Click Screenshot To Play Video

#34 Cut and Paste Collapsed code in Visual Studio

Runtime: 48Seconds - Resolution: 900 by 580 - File Size: 1.2Meg

Direct Download: If the video does not work for you,
Click Here to download it.

Snippets / Notes:

 

This work is licensed under a Creative Commons license.

Visual Studio Tip / Trick #034 English Transcription:

Today’s visual studio trick of the day trick No. 34 was originally brought to you by Sara Ford September 11, 2007. Today’s trick is cut and paste a collapsed block of code. So many places on Visual Studio you can collapse your code and while that is collapsed if you select a single line that is effecting the entire block so we are on lines 5-10; I will expand this that all of our lines. But now if I cut this, I have in fact cut all 5 lines now I go from 5 to 6 and if I go to bottom that file and paste. You will see that paste the entire block of code. The same thing is true for drag and drop. So if something highlight I can move that line up and down, it will move the entire block of code.
Kick this Trick on DotNetKicks.com

2 comment(s)

  1.  avatar

    video is corrupt, ends prematurely

  2. admin avatar

    @memals,

    Thank you for the feedback. The video feels like it ends prematurely, but that really is the end. I'll be more careful in the end of videos to give a second or two of silence as to not sound like it's being chopped off.

    Again, Thank you for the feedback.


RSS Feeds

All Technology Posts

Scott Cate Main Blog Feed


Visual Studio Tricks Only Feed

@ScottCate on Twitter

Twitter @ScottCate