Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 1.08 KB

File metadata and controls

61 lines (50 loc) · 1.08 KB

DOC106

TypeName DOC106UseTypeparamref
CheckId DOC106
Category Style Rules

Cause

The documentation contains a type parameter reference using <c>T</c> that can be converted to the preferred form <typeparamref name="T"/>.

Rule description

A violation of this rule occurs when documentation contains a type parameter reference written in inline code that can be written in a preferred form using typeparamref.

/// <summary>
/// Pass in a <c>T</c>.
/// </summary>
public void Method<T>()
{
}

How to fix violations

To fix a violation of this rule, replace the inline code with the equivalent typeparamref syntax.

/// <summary>
/// Pass in a <typeparamref name="T"/>.
/// </summary>
public void Method<T>()
{
}

How to suppress violations

#pragma warning disable DOC106 // Use 'typeparamref'
/// <summary>
/// Pass in a <c>T</c>.
/// </summary>
public void Method<T>()
#pragma warning restore DOC106 // Use 'typeparamref'
{
}