Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we inherit an interface in an abstract class?

Answer Posted / arne

yes you can. The example from anwser #4 is incorrect.

using System;

public interface IDisplay
{
void Display();
}

public abstract class MyClass : IDisplay
{

public MyClas(){};

public abstract DoSomething();

public void Display() {};
}

This code compiles fine without a problem. Abstract classes can inherit from interfaces as an abstract class defines the the functionality and restrictions for subclasses.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you create partial methods?

980


What is class sortedlist underneath?

956


How long does a loop recorder procedure take?

1001


What is Asynchronous call and how it can be implemented using delegates?

1030


What is the default value of boolean variable?

975


1. Describe page life cycle?

2112


What is serialization in dot net?

954


What is helper method in c#?

925


Which is better interface or abstract class in c#?

813


Explain the Different types of configuration files in .net?

1001


How does bitwise xor work?

906


What is the difference between method parameters and method arguments. Give an example?

934


What are the basics of c#?

1043


What is the CTS, and how does it relate to the CLS?

1000


What is namespace explain with example?

863