I would like a class to implement an interface, I do not want to change the original class (that would add undesired dependecies).
I know I could inherit from the class and make it's child implement these methods, but then I am faced with a problem how to convert the parent class (that come from the data / ORM) to this presentation class.
If I implement all the interface required methods, will it count as being that interface or not ?
No, it still won't count as implementing the interface.
Extension methods are nothing more than a way of calling static methods in a different kind of way. They don't affect object identity, inheritance etc at all.
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