RCS1225: Make class sealed
Properties
Property | Value |
---|---|
Default Severity | Info |
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()
{
}
}