4 Replies
That generic parameter would be quite useless, wouldn't it?
System.Boolean
is a sealed record, so you can't extend it
The only possible route is composition, basically
and maybe explicit cast operators
And other overloads that would make it compatible with bool
im pretty sure that all base types are sealed to avoid program obfuscation (complications)
things like strings, bools, ints, etc
They're sealed because they're not classes. They're value types in the CIL, and you cannot inherit from value types. But they're also primitives.
why do you want to do this