views:

101

answers:

2

Which metrics are there and which tools exist to measure the SOLIDness of C# code? Or tools to indicate where the principles are violated most harmfully?

+1  A: 

You can use a static analysis tool (some are built into Visual Studio 2008 and above, professional editions and higher), or NDepend.

With NDepend, you can see how tightly coupled different classes are, what the cohesion of your codebase is like and more.

Oded
Well, that's all good, but how _exactly_? We use NDepend, but it's signal/noise ratio looks very low =(
Yacoder
The Dependency Matrix, Dependency Graph and Metric View are all great visual queues. But I can't tell you what to look for without intimate knowledge of your architecture and application.
Oded
+2  A: 

Scott Hanselman has an excellent article on NDepend. Also to see violation you can also use Code Analysis that comes with Visual Studio; you can use Code Analysis Policy Editor to choose rules.

MSV Muthu