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
Is datetime value type c#?
Is c# the same as d flat?
Is everything an object c#?
What are the various components in crystal reports?
What operators can be used to cast from one reference type to another without the risk of throwing an exception?
Differentiate between method overriding from method overloading with its functionality?
How can you set image source dynamically from c# application to ”test.png” file?
how to sort an array in c#
What are the 2 broad classifications of data types available in c#?
What is a deadlock lock?
What is namespace give the example?
Why is c# used?
Is system a class in c#?
What is xor operation?
How do you create dlls in .NET