Just a little error in the documentation:
A class with only private constructors can’t be instantiated, thus, it seems to be pointless code. Noncompliant Code Example
Public Class [MyClass]
Private Sub New() // Noncompliant
' ...
End Sub
End Class
...
Both examples show
Public Class [MyClass]
Private Sub New()
' ...
End Sub
End Class
but the first one is marked as as // Noncompliant
.
My guess is that the second example should either have additional constructors or one that is not private.
2 Likes
Caba_Sagi
(Čaba Šagi)
February 25, 2022, 5:08pm
2
Hello @CrushaKRool
Thanks for reporting this issue with our documentation. I can confirm that the constructor in the compliant code example should be Public
. I have opened a PR to fix this mistake in our documentation.
All the best,
Čaba
system
(system)
Closed
March 4, 2022, 5:08pm
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.