views:

35

answers:

1

is there a quick way to tell the number of methods in an interface/class in VS2008? using Resharper? Using NDepend?

+1  A: 

(Assuming you don't mean programatically.) In Resharper, from the Resharper menu, select Windows then File Structure. This gives you an overview of the entire file you are in, listing the regions, types, fields, properties, events and methods in a hierarchy.

See the feature description which includes a screenshot.

Edit: just noticed this window has an 'export' function on the toolbar, so you could export to your favourite text editor and use editor's line count functionality (or use a command-line tool, such as 'wc -l').

Alternatively, especially if you don't have Resharper, you can just view the assembly in the Visual Studio Object Browser.

Paul Ruane
But it does not give you `number of methods in an interface/class` which is what the OP asked.
leppie
@leppie: it makes it very easy to count them.
Paul Ruane
well... counting to ~200 isn't so great :) - I was able to use a manual search, just wondering for next time... (manual search based on this interface being a web service interface with operationContract properties, but usually I don't have such luck).
Yonatan Karni
@Paul Ruane: See @Yonatan Karni's response.
leppie
@leppie: yes, he replied to my answer so I see it. I offer only suggestions based upon a very sparse problem description — if he, or you for that matter, don't like them then you are at liberty to vote them down.
Paul Ruane