Skip to content
ptittof57 edited this page Aug 15, 2015 · 5 revisions
<title>SA1643: DestructorSummaryDocumentationMustBeginWithStandardText</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

DestructorSummaryDocumentationMustBeginWithStandardText

CheckId

SA1643

Category

Documentation Rules

Cause

The Xml documentation header for a C# finalizer does not contain the appropriate summary text.

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 when the summary tag within the documentation header for a finalizer does not begin with the proper text.

The rule is intended to standardize the summary text for a finalizer. The summary for a finalizer must begin with “Finalizes an instance of the {class name} class.” For example, the following shows the finalizer for the Customer class.

/// <summary>

/// Finalizes an instance of the Customer class.

/// </summary>

~Customer()

{

}

It is possible to embed other tags into the summary text. For example:

/// <summary>

/// Finalizes an instance of the <see cref="Customer"/> class.

/// </summary>

~Customer()

{

}

How to Fix Violations

To fix a violation of this rule, edit the summary text for the finalizer as described above.

How to Suppress Violations

[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1643:DestructorSummaryDocumentationMustBeginWithStandardText", Justification = "Reviewed.")]
Clone this wiki locally