Are there published style guidelines for C# XML documentation?

.net, c#, documentation

Solution

StyleCop FxCop actually provides rules for XML documentation, as well. If you don't follow the pattern that are set by a certain set of rules, it will complain.

These are all rules SA1600-SA1647.

For example, rule SA1642: ConstructorSummaryDocumentationMustBeginWithStandardText states that :

The summary for a non-private instance constructor must begin with “Initializes a new instance of the {class name} class.”

For more information, see FxCop.

Problem

I ask my developers who write C# code to follow StyleCop's guidelines. It's great for code, but I almost always have questions about documentation (ok...ok...so no one asks, because programmers tend to hate documentation) style. I could suggest copying MSDN's style, but I'm curious whether Microsoft or someone else has published something about this. For Example, constructors are documented as follows. ``` /// <summary> /// Initializes a new instance of <c>MyClass</c> using the specified <c>BaseMyClass</c>. /// </summary> /// <param name="myParam">The <c>MyParam</c> of the current session.</param> ``` I'm not trying to spark a debate over how documentation should be written, here. I'm looking for some kind of published guidelines about the suggested syntax for documentation. Thanks in advance!

Original source