Click here to Skip to main content
12,244,322 members (49,025 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

11.7K views
1 bookmarked
Posted

Box Editing with VS2010 - Editing multiple lines at once

, 27 Apr 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Visual Studio 2010 provides a feature by which it is now possible to edit multiple lines at one go.For e.g. say you have a class which you have three member variables which are declared as private.public class MyClass{ private int myInt; private double myDouble; private...
Visual Studio 2010 provides a feature by which it is now possible to edit multiple lines at one go.

For e.g. say you have a class which you have three member variables which are declared as private.

public class MyClass
{
   private int myInt;
   private double myDouble;
   private string myString;
 
   ...
}

Now if you want to change the access of these member variables from private to protected, in VS2008 and before you need to select each private word and change it to protected.

In Visual Studio 2010, there is a better alternative to that.

Just press Alt key and perform a vertical selection and select all the three private words. (If you are using the keyboard only, then use the keys Shift + Alt + Arrow keys to select the words.)

Now just type protected once and you will notice that protected is being typed in all the three lines together. Saves a lot of time! Smile | :)

public class MyClass
{
   protected int myInt;
   protected double myDouble;
   protected string myString;
   ...
}

Alternatively, you can copy the protected word first and then perform a vertical selection (using Alt key) of all the three private words and paste once. It will paste in all three lines.

Check these links for further reference:

Link 1[^]
Link 2[^]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ratish Philip
Software Developer
United States United States
An individual with more than a decade of experience in desktop computing and mobile app development primarily on the Microsoft platform. He loves programming in C#, WPF & XAML related technologies.
Current interests include web application development, developing rich user experiences across various platforms and exploring his creative side.

Ratish's personal blog: wpfspark.wordpress.com

You may also be interested in...

Comments and Discussions

 
GeneralNot new Pin
miies29-Apr-10 3:27
membermiies29-Apr-10 3:27 
GeneralRe: Not new Pin
Ratish Philip30-Apr-10 4:16
memberRatish Philip30-Apr-10 4:16 
GeneralRe: Not new Pin
miies30-Apr-10 10:36
membermiies30-Apr-10 10:36 
GeneralRe: Not new Pin
Ratish Philip30-Apr-10 17:37
memberRatish Philip30-Apr-10 17:37 
GeneralReminds me of PC-Write 3.0 Pin
supercat927-Apr-10 7:36
membersupercat927-Apr-10 7:36 
GeneralRe: Reminds me of PC-Write 3.0 Pin
Ratish Philip27-Apr-10 16:37
memberRatish Philip27-Apr-10 16:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160426.1 | Last Updated 27 Apr 2010
Article Copyright 2010 by Ratish Philip
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid