Interface Implementation and Inheritance
Explore interfaces in the context of inheritance.
We'll cover the following
Base class methods
Suppose we have a MultimediaFile
class and we want to implement the IDownloadable
interface that has a method:
interface IDownloadable
{
void Download();
}
If MultimediaFile
derives from a class that already has a Download()
method with the same signature and return type as it was declared in IDownloadable
, then we don’t have to implement that method, because the base class already has it:
Get hands-on with 1400+ tech skills courses.