Skip to content
Christophe HEISER edited this page Aug 30, 2015 · 6 revisions
<title>SA1600: ElementsMustBeDocumented</title> <script src="script/helpstudio.js" type="text/javascript"></script> <script src="script/StandardText.js" type="text/jscript"></script> <script type="text/jscript">WritePageTop(document.title);</script>

TypeName

ElementsMustBeDocumented

CheckId

SA1600

Category

Documentation Rules

Cause

A C# code element is missing a documentation header.

Rule Description

C# syntax provides a mechanism for inserting documentation for classes and elements directly into the code, through the use of Xml documentation headers. For an introduction to these headers and a description of the header syntax, see the following article: http://msdn.microsoft.com/en-us/magazine/cc302121.aspx.

A violation of this rule occurs if an element is completely missing a documentation header, or if the header is empty. In C# the following types of elements can have documentation headers: classes, constructors, delegates, enums, events, finalizers, indexers, interfaces, methods, properties, and structs.

How to Fix Violations

To fix a violation of this rule, add or fill-in a documentation header for the element.

the following example shows a method with a valid documentation header:

```csharp /// /// Joins a first name and a last name together into a single string. /// /// The first name to join. /// The last name to join. /// The joined names. public string JoinNames(string firstName, string lastName) { return firstName + " " + lastName; } ```

How to Suppress Violations

```csharp [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed.")] ```
Clone this wiki locally