Blankman
Blankman

Reputation: 266920

How can I get a list of all classes and methods used in a Visual Studio project?

Are there any reporting tools for Visual Studio 2008 that can build a list of all classes and methods used in a project?

Upvotes: 0

Views: 2745

Answers (2)

Martin
Martin

Reputation: 2434

You can use reflection if you need all the names, something like (in VB.NET)

 Dim myType As Type = GetType(myclassname)
 Dim myArrayMethodInfo As MethodInfo() = myType.GetMethods(BindingFlags.Public Or BindingFlags.Instance Or BindingFlags.DeclaredOnly)
    For i As Integer = 0 To myArrayMethodInfo.Length - 1
        Dim mi As MethodInfo = CType(myArrayMethodInfo(i), MethodInfo)            
        Debug.Print(mi.Name)                       
    Next i

Or you can use a 3rd party tool such as OxyProject Metrics if you just want to count them.

Upvotes: 0

tanascius
tanascius

Reputation: 53934

NDepend can create such reports. It has its own query language, so that even you can select types/members depending on some metadata.

Upvotes: 5

Related Questions