DOC107

February 11, 2021 ยท View on GitHub

TypeName DOC107UseSeeCref
CheckId DOC107
Category Style Rules

Cause

The documentation contains a code element reference using <c>name</c> that can be converted to the preferred form <see cref="name"/>.

Rule description

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

int SomeValue { get; }

/// <summary>
/// Depends on <c>SomeValue</c>.
/// </summary>
public void Method()
{
}

How to fix violations

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

int SomeValue { get; }

/// <summary>
/// Depends on <see cref="SomeValue"/>.
/// </summary>
public void Method()
{
}

How to suppress violations

int SomeValue { get; }

#pragma warning disable DOC107 // Use 'see cref'
/// <summary>
/// Depends on <c>SomeValue</c>.
/// </summary>
public void Method()
#pragma warning restore DOC107 // Use 'see cref'
{
}