Can you provide scenarios when we inherit from a class, it works for a while, but then something else changes and introduces a bug? I came up with the following situation:
What are the other problems I should be careful if I choose to use object inheritance in C#.
What you are describing is one of the pitfalls of inheritance.
Another pitfall is a deep inheritance hierarchy. Stackoverflow thread on composition over inheritance.
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