Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 1.08 KB

DOC105.md

File metadata and controls

61 lines (50 loc) · 1.08 KB

DOC105

TypeName DOC105UseParamref
CheckId DOC105
Category Style Rules

Cause

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

Rule description

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

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

How to fix violations

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

/// <summary>
/// Pass in a <paramref name="value"/>.
/// </summary>
public void Method(int value)
{
}

How to suppress violations

#pragma warning disable DOC105 // Use 'paramref'
/// <summary>
/// Pass in a <c>value</c>.
/// </summary>
public void Method(int value)
#pragma warning restore DOC104 // Use 'paramref'
{
}