No you shouldn’t need any casts, that defeats the purpose of an interface. The interface doesn’t know what it’s communicating with and shouldn’t need to know. It’s the job of the object to implement the interface and handle the outcome.
No you shouldn’t need any casts, that defeats the purpose of an interface. The interface doesn’t know what it’s communicating with and shouldn’t need to know. It’s the job of the object to implement the interface and handle the outcome.