Saturday, February 17, 2007 4:30 PM
bart
Visual Studio tip - select a rectangular block of code
A little tip but definitely a time-saver in case you didn't know about it yet... Quite a bit of Word users should be familiar with this one:
What I'm talking about is ALT+mouse selection (any official marketing name for this feature out there?). Guidelines: hold the ALT button on the keyboard and make a selection with the mouse; you'll be able to select a "rectangular block" of text. But did you know it's out there in Visual Studio too?
The reason for this post: recently a reader of my blog complained about the line numbering in my code samples:
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 namespace RunspaceDemo
6 {
7 class Class1
8 {
9 public void Bar()
10 {
11 Console.WriteLine("Hi there");
12 }
13 }
14 }
When copying this piece of code to Visual Studio, you'll see something like this:
Of course, you could manually delete all of the line numbers. However, using ALT+select this becomes much easier:
Just press Delete and you're ready to go!
Del.icio.us |
Digg It |
Technorati |
Blinklist |
Furl |
reddit |
DotNetKicks
Filed under: Visual Studio 2005