rspec/rules/S3260/csharp/rule.adoc

30 lines
549 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
``++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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
private class MyClass // Noncompliant
{
// ...
}
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
private sealed class MyClass
{
// ...
}
----
ifdef::env-github,rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]