Send comments on this topic. |
|
Cause
Rule Description
A violation of this rule occurs when the element documentation header above an element is not preceded by a blank line. For example:
public bool Visible
{
get { return this.visible; }
}
/// <summary>
/// Gets a value indicating whether the control is enabled.
/// </summary>
public bool Enabled
{
get { return this.enabled; }
}
The code above would generate an instance of this violation, since the documentation header is not preceded by a blank line.
An exception to this rule occurs when the documentation header is the first item within its scope. In this case, the header should not be preceded by a blank line. For example:
public class Class1
{
/// <summary>
/// Gets a value indicating whether the control is enabled.
/// </summary>
public bool Enabled
{
get { return this.enabled; }
}
}
In the code above, the header is the first item within its scope, and thus it should not be preceded by a blank line.
How to Fix Violations
© Microsoft Corporation. All Rights Reserved.