Finding "not used methods"

  • Thread starter Thread starter Anders K. Jacobsen [DK]
  • Start date Start date
A

Anders K. Jacobsen [DK]

Hey

I have been givin the job the extend an asp.net c# application with and
extensive but very poor documented business layer. There are aprox 1200
methods like: FindAvailAmount, GetAllEmployee etc.

But as far as I can see many of the methods aint ever used. Is there a way
to traverse the layer and name methods that never called from any location
in the source code?

Looking forward to your suggestion
Anders
 
Hi Anders,
if you are using Visual Studio then I would recomend a plugin called
ReSharper http://www.jetbrains.com/resharper/ it can be used for refactoring
and will highlight methods, variables, namespace imports that are not used
anywhere in the code. I find it very useful.

Hope that helps
Mark R Dawson
 
Larry Lard said:
If I remember right, FxCop includes a check for uncalled methods - and
it's free :)

and always be careful of removing the *reported* unused methods if you have
any calling of methods via reflection!
 
and always be careful of removing the *reported* unused methods if you
have any calling of methods via reflection!

Good point :)

Thanks for the suggestions. I´ll look into all of them.

Thanks!
Anders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top