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

What does using system mean in c#?

964


What is the difference between C# 3.5 and C# 4.0?

885


Why would you use a class property in c#?

867


How do you create user defined data types in c#?

952


What is class in oops with example in c#?

861


Write a program in c# to find the angle between the hours and minutes in a clock?

863


What is the difference between system.text.stringbuilder and system.string?

958


What is hashtable c#?

806


What is final keyword in c#?

924


Which are the access modifiers available in c#?

892


Can a loop recorder detect a heart attack?

962


Do vs while c#?

836


What is generic method in c#?

889


Is clr a compiler?

817


What does type safe mean in c#?

918