Compare Clone Code in Visual Studio

Code Clone helps you to identify the duplicate code with in the files, projects as well within solution. This helps us to identify the  logics that can be refactored and can be rewritten in a common method.  You can check out this tip to learn how this code clone works.   Once you have the matched code, you can easily compare the clones code block and see the difference with in Visual Studio Editor itself.

This operation can be directly performed from the code clone result window, just select the files you wants to compare, and select “Compare” option from the context menu.

Compare Cloned Code

The Visual Studio Code editor will display the compared code with both added and removed code legends.

Compare Cloned Code in VS Editor

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

One Comment to “Compare Clone Code in Visual Studio”

Comments are closed.