I've recently been using the System.Version
class and have wondered why it, and some other similarly simple enough classes, are marked as Sealed
(NotInheritable
in VB).
Unlike some more complex classes I don't see what such a class would gain by being sealed.
As far as I can tell the source for Version
does not imply any reason.
Is there a published/official (i.e. not opinion based) reason for this? Is there some problem that may be caused by deriving from it? Specifically for the case of Version
, or failing that for similarly simple classes.
Background: I have had to recreate the Version
class to make it easier to use it with two-way binding as the MS version has ReadOnly
properties. But I'd need to know if deriving would cause some issue