Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 iqueryable in linq?

937


Write a program to create a user control with name and surname as data members and login as method and also the code to call it. (Hint use event delegates) Practical Example of Passing an Events to delegates

934


Explain the process of polymorphism with an example?

967


Can scriptable objects have methods?

937


Explain what is an interface in c#?

1006


How long has c# been around?

1052


What are the boolean data types in c#?

1064


What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?

1212


Why can’t struct be used instead of class for storing entity?

1019


How to find whether the application is run from inside ide or not?

1100


Is an interface a type c#?

1009


Can the nested class access, the containing class. Give an example?

943


Can a struct be null?

976


What are get and set in c#?

1063


What is verbatim string?

983