n C #, we cannot create an instance of an abstract class. So, is it still important to define public constructors for abstract classes in C #? Or not write public constructors for abstract classes because of semantic meaning?
That's right. You do not want the user to see an accessible constructor, but when they call it, they get a compilation error.
Define internal constructors? It is stated in (1) that the non-definition of internal protected constructors is due to the fact that "constructors with open or protected internal visibility are for types that can be created." Does the internal constructors for abstract classes determine to break the rules in (1)?
I believe that rule 1 on public and protected internal rule 2 is protected and internal . Thus, there is no intersection between them.
source share