When a class has only a private constructor, it can’t be instantiated except within the class itself. Such classes can be considered
dead code and should be fixed
static members, nested types, or both are ignored. Classes with only static members are
covered by Rule {rule:vbnet:S1118}.
Public Class [MyClass] ' Noncompliant: the class contains only private constructors
Private Sub New()
' ...
End Sub
End Class
Public Class [MyClass] ' Compliant: the class contains at least one non-private constructor
Public Sub New()
' ...
End Sub
End Class