38 lines
644 B
Plaintext
38 lines
644 B
Plaintext
``++private++`` classes aren't visible outside of their assemblies anyway, so if they're not extended inside the assemblies, they should be made explicitly non-extensible with the addition of the ``++sealed++`` keyword.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
private class MyClass // Noncompliant
|
|
{
|
|
// ...
|
|
}
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
private sealed class MyClass
|
|
{
|
|
// ...
|
|
}
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|