.net 2.0 - unused class variables / methods

Discussion in 'ASP .Net' started by Rob Meade, Jul 4, 2007.

  1. Rob Meade

    Rob Meade Guest

    Hi all,

    I'm using Visual Studio 2005 and it has as you are probably aware a very
    handy feature of reporting to you which variables are not being used - cool
    thanks...

    What would be even more handy is a way of finding out which of my methods
    are being used, and across a whole project. I've entered the horrible
    realms of a project going out of control and I've added bits for testing,
    and now I'm having to go through the whole project, commenting stuff out,
    rebuilding and seeing if it works - I'm sure there's an easy/quicker way...

    Anyone know of any tools that can identify which methods are not being used
    in a project?

    Any help would be appreciated.

    Regards

    Rob
     
    Rob Meade, Jul 4, 2007
    #1
    1. Advertising

  2. Right click on the method and "Find all references"
    --
    Milosz


    "Rob Meade" wrote:

    > Hi all,
    >
    > I'm using Visual Studio 2005 and it has as you are probably aware a very
    > handy feature of reporting to you which variables are not being used - cool
    > thanks...
    >
    > What would be even more handy is a way of finding out which of my methods
    > are being used, and across a whole project. I've entered the horrible
    > realms of a project going out of control and I've added bits for testing,
    > and now I'm having to go through the whole project, commenting stuff out,
    > rebuilding and seeing if it works - I'm sure there's an easy/quicker way...
    >
    > Anyone know of any tools that can identify which methods are not being used
    > in a project?
    >
    > Any help would be appreciated.
    >
    > Regards
    >
    > Rob
    >
    >
    >
     
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=, Jul 4, 2007
    #2
    1. Advertising

  3. Rob Meade

    Rob Meade Guest

    "Milosz Skalecki [MCAD]" wrote ...

    > Right click on the method and "Find all references"


    OMG - LOL! Hi Milosz, thanks for the reply - talk about the answer being
    under my own nose...hehe...the amount of times in a day I right click and
    choose "goto definition" - lol...never seen that before...

    Many thanks - its really useful!

    Still be handy to have something that checked the entire project for unused
    methods/properties etc....

    Rob
     
    Rob Meade, Jul 5, 2007
    #3
  4. Hi Rob,

    I'm really glad it helped you. There are some code analysis/review tools.
    Most of them are comercial so you'd have to spend some money. Have a look
    here:
    http://msdn2.microsoft.com/en-us/vc...dn2.microsoft.com/en-us/vcsharp/aa336818.aspx

    Regards
    --
    Milosz


    "Rob Meade" wrote:

    > "Milosz Skalecki [MCAD]" wrote ...
    >
    > > Right click on the method and "Find all references"

    >
    > OMG - LOL! Hi Milosz, thanks for the reply - talk about the answer being
    > under my own nose...hehe...the amount of times in a day I right click and
    > choose "goto definition" - lol...never seen that before...
    >
    > Many thanks - its really useful!
    >
    > Still be handy to have something that checked the entire project for unused
    > methods/properties etc....
    >
    > Rob
    >
    >
    >
     
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=, Jul 5, 2007
    #4
  5. Rob Meade

    Rob Meade Guest

    Rob Meade, Jul 6, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fx
    Replies:
    6
    Views:
    3,141
    John C. Bollinger
    Oct 28, 2004
  2. Replies:
    5
    Views:
    6,793
    Chris Smith
    Nov 2, 2005
  3. Replies:
    4
    Views:
    412
    Jay Nabonne
    Sep 15, 2005
  4. ThazKool
    Replies:
    9
    Views:
    358
    Phlip
    Jun 17, 2006
  5. Kenneth McDonald
    Replies:
    5
    Views:
    321
    Kenneth McDonald
    Sep 26, 2008
Loading...

Share This Page