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


Please Help Members By Posting Answers For Below Questions

What is the purpose of namespace in c#?

635


What is windows forms in c#?

648


What are the collections in c#?

665


What is equal c#?

704


What is difference between constants and read-only?

647


What is the real use of interface in c#?

645


What is an inheritance in c#?

663


Can multiple inheritance implemented in c# ?

698


How more than one version of an assembly can keep in same place?

714


What is icomparer in c#?

680


What is the use of inheritance in c#?

667


How many digits are in an integer?

633


Please write a program to display “welcome to bestinterviewquestion.com” in c#?

709


1. Describe page life cycle?

1822


What is generic in c#?

625