Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

April 4, 2010

Visual Studio: Box Selection

Filed under: C#,VB.NET,Visual Studio @ 9:52 pm

I have been using Visual Studio for a long time, so I am always excited when I find out something about Visual Studio that I did not know. I’m not sure when it appeared (could it have been in Visual Studio 2002?), but I found it today: Box Selection.

Simply hold down the Alt key to select a rectangular box of text in the text editor instead of selecting lines.

Say, for example you have these two lines of code:

In C#:

image

You want to copy the comments to paste elsewhere. Just hold down the Alt key and select the text shown in green.

image

In VB:

image

You want to copy the comments to paste elsewhere. Just hold down the Alt key and select the text shown in green.

image

The text shown in yellow in both examples is your "box selection". You can then copy or paste it or even delete it.

Use this technique any time you want to copy, delete, or replace a block of text.

Enjoy!

RSS feed for comments on this post. TrackBack URI

Leave a comment

© 2019 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs