Skip to main content

RCS1225: Make class sealed

Properties​

PropertyValue
Default SeverityInfo
Minimum language version-

Summary​

A class that has only private constructors should be marked as sealed.

Examples​

Example #1​

diagnostic.cs
public class Foo
{
private Foo()
{
}
}
fix.cs
public sealed class Foo
{
private Foo()
{
}
}

Applies to​