Send comments on this topic. |
|
Cause
A section within the Xml documentation header for a C# element contains blank lines.
Rule Description
A violation of this rule occurs when the documentation header contains one or more blank lines within a section of documentation. For example:
/// <summary>
/// Joins a first name and a last name together into a single string.
///
/// Uses a simple form of string concatenation.
/// </summary>
/// <param name="firstName">The first name to join.</param>
/// <param name="lastName">The last name to join.</param>
/// <returns>The joined names.</returns>
public string JoinNames(string firstName, string lastName)
{
return firstName + " " + lastName;
}
Rather than inserting blank lines into the documentation, use the <para> tag to denote paragraphs. For example:
/// <summary>
/// <para>
/// Joins a first name and a last name together into a single string.
/// </para><para>
/// Uses a simple form of string concatenation.
/// </para>
/// </summary>
/// <param name="firstName">The first name to join.</param>
/// <param name="lastName">The last name to join.</param>
/// <returns>The joined names.</returns>
public string JoinNames(string firstName, string lastName)
{
return firstName + " " + lastName;
}
How to Fix Violations
© Microsoft Corporation. All Rights Reserved.