Skip to Main Content
Professional Visual Studio® 2008
book

Professional Visual Studio® 2008

by Nick Randolph, David Gardner
July 2008
Intermediate to advanced content levelIntermediate to advanced
1026 pages
27h 59m
English
Wrox
Content preview from Professional Visual Studio® 2008

55.1. Code Metrics

Code metrics will serve as a reference to know how maintainable your code is. This feature is new in Visual Studio 2008; in this version it comes with five metrics. All of them have to be looked at with care, and you have to set your own context at the time you evaluate your projects. Figure 55-1 shows the Code Metrics window for a sample project. You open this window from the Analyze Windows Code Metric Results menu. To calculate the metrics you should hit the button on the top-left corner. The Code Metrics window shows a hierarchy of the projects, namespaces, types, and members.

Directly from the list you can filter any of the metrics to show methods that fall within a specified range, export to Excel, configure columns to remove metrics, or create a work item. Export to Excel is particularly useful to generate reports using pivot tables or to work with a flat view of the information using filters and sorts. For example, if you want to look for methods with more than 15 lines of code, filtering directly in the Code Metrics window will get you a lot of namespaces and types, but you will have to expand each to see whether there are any methods, whereas in Excel you can easily filter out namespaces and types and only look at methods.

Work items are activities assigned ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson

Publisher Resources

ISBN: 9780470229880Purchase book