Skip to content

Latest commit

 

History

History
66 lines (55 loc) · 1.35 KB

DOC101.md

File metadata and controls

66 lines (55 loc) · 1.35 KB

DOC101

TypeName DOC101UseChildBlocksConsistently
CheckId DOC101
Category Style Rules

Cause

A documentation element contains some children which are block-level elements, but other children which are not.

Rule description

A violation of this rule occurs when a documentation element contains some children which are block-level elements, but other children which are not.

/// <summary>Summary text.</summary>
/// <param name="x">
/// Parameter documentation.
/// <para>Parameter documentation continued.</para>
/// </param>
public void SomeOperation(int x)
{
}

How to fix violations

To fix a violation of this rule, place the content in a block-level element, such as a <para> element.

/// <summary>Summary text.</summary>
/// <param name="x">
/// <para>Parameter documentation.</para>
/// <para>Parameter documentation continued.</para>
/// </param>
public void SomeOperation(int x)
{
}

How to suppress violations

#pragma warning disable DOC101 // Use child blocks consistently
/// <summary>Summary text.</summary>
/// <param name="x">
/// Inline content.
/// <para>Block content.</para>
/// </param>
public void SomeOperation(int x)
#pragma warning restore DOC101 // Use child blocks consistently
{
}