0

Sealed class

am i write all class sealed if i not use base class

11th Dec 2016, 8:33 PM
Kenan Yazkan
Kenan Yazkan - avatar
3 Respuestas
+ 1
If you don't want your classes to be used as base class you mark them sealed, yes
11th Dec 2016, 9:03 PM
Ivan G
Ivan G - avatar
0
why we all write default public or private instead of sealed if we don't use base class?
12th Dec 2016, 2:35 PM
Kenan Yazkan
Kenan Yazkan - avatar
0
Publicity modifiers do nothing with sealing. You can have public sealed or private sealed classes. And sealed modifier is not in default class template, so maybe that is why.
12th Dec 2016, 4:34 PM
Ivan G
Ivan G - avatar