Avoid using cref tags with a prefix
Avoid using cref tags with a prefix
Microsoft docsDescription
The cref attribute in an XML documentation tag means "code reference". It specifies that the inner text of the tag is a code element, such as a type, method, or property. Avoid using cref tags with prefixes, because it prevents the compiler from verifying references. It also prevents the Visual Studio integrated development environment (IDE) from finding and updating these symbol references during refactorings. It is recommended that you use the full syntax without prefixes to reference symbol names in cref tags.
Cause
The cref tag in an XML documentation comment uses a prefix.
How to fix violations
To fix a violation of this rule, remove the prefix from the cref tag. For example, the following two code snippets show a violation of the rule and how to fix it:
Example
// Violates CA1200
/// <summary>
/// Type <see cref="T:C" /> contains method <see cref="F:C.F" />
/// </summary>
class C
{
public void F() { }
}When to suppress
It's safe to suppress this warning if the code reference must use a prefix because the referenced type is not findable by the compiler. For example, if a code reference references a special attribute in the full framework, but the file compiles against the portable framework, you can suppress this warning.