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
Can you declare a field readonly?
What is inheritance in csharp?
Tell me the difference between value passing and address passing?
What is inumerable?
What is default method in c#?
What is xor operation?
What does it mean to override a method?
How many types of polymorphism are there?
What are indexers in c# .net?
What is cli in c#?
Explain the concepts of cts and cls(common language specification).
What are nested classes in c#?
Is c# an array?
How many bytes is an int?
What is parsing? How to parse a date time string?