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 is the purpose of namespace in c#?
What is windows forms in c#?
What are the collections in c#?
What is equal c#?
What is difference between constants and read-only?
What is the real use of interface in c#?
What is an inheritance in c#?
Can multiple inheritance implemented in c# ?
How more than one version of an assembly can keep in same place?
What is icomparer in c#?
What is the use of inheritance in c#?
How many digits are in an integer?
Please write a program to display “welcome to bestinterviewquestion.com” in c#?
1. Describe page life cycle?
What is generic in c#?