Can we inherit an abstract class in another abstract class.
If no why and If yes how..?
Answer Posted / anonymous
Yes we can Inherit abstract class into another abstract
class just like we inherit any other class. Since the
Inheriting class is also an Abstract class so there is also
no need to override the parent class methods.
Example:
namespace AbstractNamespace
{
public class AbstractClass1 //Parent Abstract Class
{
public abstract string MyFunction1();
}
public class AbstractClass2 : AbstractClass1 //Child
Abstract Class
{
public abstract string MyFunction2();
}
public class TestAbstractClasses : AbstractClass2
{
//Here you will need to override both the functions
//MyFunction1() and MyFunction2()
}
}
Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What does out mean c#?
What is session management in c#?
Is php easier than c#?
What is hashtable in c# with example?
Can I fly with a loop recorder?
Is it possible to inherit multiple interfaces?
What are the properties in c#?
What is the purpose of private constructor in c#?
What are the steps to create an assembly and add it to the gac?
Can you instantiate an abstract class c#?
What is entity framework c#?
What is the difference between string keyword and system.string class?
What is state c#?
Is php better than c#?
Explain boxing and unboxing in c#?