rspec/rules/S3260/csharp/rule.adoc
2021-04-28 18:08:03 +02:00

23 lines
392 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
{
// ...
}
----