✅ ✅ Use function that has default implementation in interface from instance of class
I have interface similar to this:
now i have class like this:
and i want to use it like this:
is this possible? maybe some keyword on the interface or something (i know i can cast it, but i don't want to do that)
6 Replies
You would need to either move the implementation of DoMultipleThings to the Bar class, or create a base class that implements the method.
they can
Wait, am I dumb?
Hold on....
You're correct, I apologise.
ah thanks, i will just go abstract class than
Your code should work?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.