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
What does using system mean in c#?
What is the difference between C# 3.5 and C# 4.0?
Why would you use a class property in c#?
How do you create user defined data types in c#?
What is class in oops with example in c#?
Write a program in c# to find the angle between the hours and minutes in a clock?
What is the difference between system.text.stringbuilder and system.string?
What is hashtable c#?
What is final keyword in c#?
Which are the access modifiers available in c#?
Can a loop recorder detect a heart attack?
Do vs while c#?
What is generic method in c#?
Is clr a compiler?
What does type safe mean in c#?