If sealed class is internal, so I don’t have to write internal modifier to his heirs, or not?
t
Tobias Berger
11/27/2020, 12:54 PM
actually you have to add it. The modifyer is not added automatically. It won't compile if you don't add some explicit visibility modifyer, because it would be public by default which is not possible because you would expose the internal class.
t
tseisel
11/28/2020, 11:07 AM
If heirs are nested in sealed class definition : no.
If heirs are defined at the same level as sealed class : yes.