Interface with Multiple Base Interfaces

As you build interface hierarchies, in C# it is permissible to create an interface that derives multiple base interfaces. Example-

public interface ICar
{
   void Drive();
}
public interface IUnderWaterCar
{
   void Drive();
}
//implementing an interface with two interfaces
public interface ITarjanWonderCar : ICar, IUnderWaterCar
{
   void TurboDrive();
}

Please be aware that it is not permissible to build a class that derives from multiple base classes.

This entry was posted in C#, Knowledge Sharing, Troubleshooting. Bookmark the permalink.

5 Responses to Interface with Multiple Base Interfaces

  1. SebastianCalhoun says:

    Thanks for sharing, really cool site

  2. you have gotten an superb weblog here! would you like to create some invite posts on my weblog?

  3. Very interesting points you have remarked, regards for posting.

  4. You could certainly see your skills in the paintings you write. The sector hopes for more passionate writers like you who aren’t afraid to say how they believe. At all times follow your heart.

  5. you’re in point of fact a good webmaster. The site loading pace is amazing. It kind of feels that you are doing any unique trick. Also, The contents are masterwork. you’ve performed a fantastic job on this subject!

Leave a Reply