Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 621 Bytes

RCS1225.md

File metadata and controls

42 lines (30 loc) · 621 Bytes

RCS1225: Make class sealed

Property Value
Id RCS1225
Category Design
Severity Info

Summary

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

Example

Code with Diagnostic

public class Foo // RCS1225
{
    private Foo()
    {
    }
}

Code with Fix

public sealed class Foo
{
    private Foo()
    {
    }
}

See Also

(Generated with DotMarkdown)