Monday, June 20, 2016

Simplified Rename feature in Visual Studio 2015

Visual studio 2015 is a great IDE and I love all the latest features provided in this edition. I have always been a fan of refactoring features and with Visual Studio 2015 they are now more streamlined. In this blog post , we are going to learn about rename refactoring features. So Let’s get started.

We can use this renaming feature when we have found there is a spelling mistake in variable declaration and we want to rename that with correct spelling. This is the just scenario I have explained but there could be much more. So Let’s see how it works.

rename-feature-explanation

In above code, you can see that we have made some spelling mistake with employees variable and we want to correct it. So you select that variable and right click and select rename or you can press shortcut Ctrl+ R,Ctrl +R.

rename-features-streamline

Once you click on rename it will open the following dialog.

rename-feature-dialog-visual-studio-2015

This dialog contains three options.

  1. Include comments – which will replace this word in comments also.
  2. Include strings – Which will replace this word in the string which we have defined in double quotes.
  3. Preview changes – It will show a preview of changes we are going to make.
Now you can see the highlighted part in above where I’m going to change from employie to employees.

rename-feature-demo-visual-studio-2015

Now once you click on apply it will open a preview dialog like following.

employee-preview-dialog

Once you will click on apply it will apply the changes.

applied-changes-rename-features

That’s it. It’s very easy Hope you like it. Stay tuned for more!!.
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews