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...

When should we use abtract class and Interface Class?Give
an Example

Answer Posted / pallavi

Use an abstract class when you want to inherit only from the parent
Use an interface when you want to inherit from multiple sources
If the behaviour of base class is default behaviour of all the sub classes the use abstract. If it is not default behaviour for all the classes use interface.
Interface - CAN-DO relationship
abstract class - IS-A relationship

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the updatepanel?

1019


What is web api and why to use it?

1069


What is the size of Get method and how much data it can store?

1166


Explain what are delegates?

1107


How many types of cache are there?

987


Why SessionID changes in every request in asp.net?

975


What is the maximum amount of memory any single process on windows can address?

1034


What are the difference between function and stored procedure in .net programming language?

711


Which library is used by the testers and developers to develop automated tests and create testing tools?

1000


Where sessions are stored in asp.net?

1017


What is state management in asp.net with example?

957


How does asp.net work?

956


What is the mvc model?

1012


How to use multiple scriptmanager controls in a web page?

1109


What are the different web pages?

928