Why I can't use a class that inherits a Shapes class?
I need to extend the Rectangle class with some methods, but i want to use this class in the same way I use a Shape, how can I do?
You can write a class which derives from Shape. You can't write a class which derives from Rectangle, because that's sealed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With