Search code examples
c#classrefactoringdead-code

How to Identify any redundant code C#


I have been given this task: Identify any redundant code in the classes. Explain in detail why the code is redundant.

I am working with a large scale c# application with dozens of classes, can anyone recommend where to begin or how best to approach this?


Solution

  • you can use microsoft visual studio for this here is link of it , this feature is part of visual studio 2013 mostly part of Code analyzer.

    Finding Duplicate Code by using Code Clone Detection

    couple of good question sabout code coverage:

    What can I use for good quality Code Coverage for C#/.NET?

    C# Code Coverage metrics

    Also look at Microsoft's FxCop for static analysis:

    http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx