Every day I am discovering something new with Visual Studio 2010 and In this post I am again going to explain you new interesting feature of 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.
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.
Now I want to make it protected so I started writing protected and it will modify all the line at same time like following.
And now my code is like following.
That's it. Hope you like it… Stay tuned for more…Till then Happy programming.
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.
Now I want to make it protected so I started writing protected and it will modify all the line at same time like following.
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… Stay tuned for more…Till then Happy programming.
Nice post. But you will find several for this if you google.
ReplyDeleteThanks I am writing for my blog readers and Here I am expressing my experience with Visual Studio 2010.
ReplyDeleteUsefull source code. thanks
ReplyDeleteThanks jaggu. This is an excellent article.
ReplyDelete