Skip to main content

RCS1194: Implement exception constructors

Properties

PropertyValue
Default SeverityWarning
Minimum language version-

Examples

Example #1

diagnostic.cs
public class FooException : Exception
{
}
fix.cs
public class FooException : Exception
{
public FooException() : base()
{
}

public FooException(string message) : base(message)
{
}

public FooException(string message, Exception innerException) : base(message, innerException)
{
}
}

Applies to