I inherited a large quantity of legacy code, and I very frequently
find methods, constants, properties, variables, etc., that are no
longer referenced by any code. Does anyone know of that can display a
list of assembly or solution members that aren't actually referenced
anywhere within the assembly or solution?
Nicholas Paldino [.NET/C# MVP] - 26 Oct 2007 15:38 GMT
You could use Reflector to do this. If you highlight a method, you can
right click and select "analyze", which then gives you a pane in the right
hand side of the app which would then have a number of elements to tell you
how it is used in the rest of the assembly (and any other assemblies which
are currently loaded into Reflector).

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>I inherited a large quantity of legacy code, and I very frequently
> find methods, constants, properties, variables, etc., that are no
> longer referenced by any code. Does anyone know of that can display a
> list of assembly or solution members that aren't actually referenced
> anywhere within the assembly or solution?
kh - 26 Oct 2007 17:15 GMT
ReSharper is pretty good at this kind of analysis
> I inherited a large quantity of legacy code, and I very frequently
> find methods, constants, properties, variables, etc., that are no
> longer referenced by any code. Does anyone know of that can display a
> list of assembly or solution members that aren't actually referenced
> anywhere within the assembly or solution?
Andrew Faust - 27 Oct 2007 07:17 GMT
Plus they have a 30 day free trial so you can clean up your code before it
expires without having to buy it. It's worth the cost, though.

Signature
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
> ReSharper is pretty good at this kind of analysis
>
[quoted text clipped - 3 lines]
>> list of assembly or solution members that aren't actually referenced
>> anywhere within the assembly or solution?