Question

Does anyone know how to change the StyleCop rule SA1600 that says elements must be documented so that it only applies to properties and not to private members?

Our ORM (DevExpress XPO) requires that you have private members for all public properties (because you have to call a function in the setter to persist it as well as storing it in the private member), and commenting both the public property and the private member with the same thing is killing me considering that some of the tables have upwards of 50 fields.

Was it helpful?

Solution

Right click on your project node in Visual Studio, select StyleCop Settings. On the Rules tab, select the Documentation Rules node. In the right-hand pane, select the Ignore privates checkbox, and\or unselect the Include fields box. Either of these will achieve the desired effect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top