The Box Selection in Visual Studio 2010

Posted By  jalpesh On 06 Aug 2011 22:08:03
emailbookmarkadd commentsprint
No of Views:1422
Bookmarked:0 times
Votes:0 times

Introduction

In this tips, I'm going to explain how to do box selection in visual studio 2010. We all required to modify the code in bulk some time and there is a new features for Visual Studio 2010 which enables to made changes in multiple line at same time. Let’s take a simple example like following.

using System;
 
namespace Parallel
{
  class Program
  {
         private int a=10;
         private int b=10;
         private int c=10;
 
         static void Main(string[] args)
         {
 
         } 
  }
}

In above code I have three private variable a,b and c and now I want to make them protected. There is two way either I do manually one by one or I can do it with box selection and modify them together. It very easy to use this feature Press ALT+ SHIFT and draw box with help of mouse on the code which you need to modify like following.

Image Loading

Now I want to make it protected so I started writing protected and it will modify all the line at same time like following.

Image Loading

And now my code is like following.

using System;
 
namespace Parallel
{
  class Program
  {
         protected int a=10;
         protected int b=10;
         protected int c=10;
 
         static void Main(string[] args)
         {
 
         } 
  }
}

That's it. Hope you like it.Happy programming.

Sign Up to vote for this article
Other popular Tips/Tricks
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top
</