神刀安全网

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.

Simplified Rename feature in Visual Studio 2015

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.

Simplified Rename feature in Visual Studio 2015

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

Simplified Rename feature in 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.

Simplified Rename feature in Visual Studio 2015

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

Simplified Rename feature in Visual Studio 2015

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

Simplified Rename feature in Visual Studio 2015

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

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Simplified Rename feature in Visual Studio 2015

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址