XML documentation must match procedure signature (DC0005)
When XML documentation is provided for a procedure, it must accurately reflect the procedure’s signature. Parameters documented in XML must exist in the procedure, and all procedure parameters should be documented. Similarly, the return value documentation must match whether the procedure actually returns a value.
Inconsistent documentation is worse than no documentation because it misleads consumers of the API.
Example
The following procedure has XML documentation that doesn’t match its signature:
codeunit 50100 MyCodeunit
{
/// <summary>
/// Calculates the total.
/// </summary>
/// <param name="Amount">The amount.</param>
procedure CalculateTotal(Quantity: Decimal) // XML documentation must match procedure signature [DC0005]
begin
end;
}
To fix this, update the XML documentation to match the actual signature:
codeunit 50100 MyCodeunit
{
/// <summary>
/// Calculates the total.
/// </summary>
/// <param name="Quantity">The quantity to calculate.</param>
procedure CalculateTotal(Quantity: Decimal)
begin
end;
}
See also
- DC0004 - Public procedure requires XML documentation