I have an application at work, which I started work on about 7 years ago. This was my first engagement in ASP.NET web applications, and coming from a Win32 background I had a hard time adjusting. All this time, both the project and myself have matured and now most parts of it are well defined, properly structured and readable. However, there is a significant piece of it, that is old junk. By that I mean old obsolete code, that was not working well, or was not properly structured, which has been replaced, but left in the source files instead of being removed. I must note here, that I was not the sole developer, but did most of the coding throughout. What I want to do, is whenever I have free time at work, to remove the old obsolete and unused code. Are there any techniques/methodologies that I can use/follow in order to do this more efficiently? Any tools perhaps?EDIT: (clarification based on feedback)The code I am talking about is not used anywhere, and is not called from anywhere in the project. What I need is way to find out where the code resides, since we are talking about a large codebase. So something in terms of code coverage tools would help. Any suggestions for asp.net projects? (the particular case is in Web Site project form)
Code cleanup methods and/or code coverage tools
refactoring;clean code;legacy
The static code analysis tools included with Visual Studio will find code with no upstream callers.  If you don't want to turn on all of the code analysis rules for your project, look for the following rules to turn on:CA1811: Avoid uncalled private code (Performance Rules)CA1812: Avoid uninstantiated internal classes (Performance Rules)CA1801: Review unused parameters (Usage Rules)CA1804: Remove unused locals (Performance Rules)No idea why some are under the Performance category and others under Usage, but these are the rules I'm aware of to find unused code in VS.