Skip to main content

RCS1140: Add exception to documentation comment

Properties

PropertyValue
Default SeverityHidden
Minimum language version-

Examples

Example #1

diagnostic.cs
/// <summary>
/// ...
/// </summary>
/// <param name="parameter"></param>
public void Foo(object parameter)
{
if (parameter == null)
throw new ArgumentNullException(nameof(parameter));
}
fix.cs
/// <summary>
/// ...
/// </summary>
/// <param name="parameter"></param>
/// <exception cref="ArgumentNullException"><paramref name="parameter"/> is <c>null</c>.</exception>
public void Foo(object parameter)
{
if (parameter == null)
throw new ArgumentNullException(nameof(parameter));
}

Applies to