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
Explain the updatepanel?
What is web api and why to use it?
What is the size of Get method and how much data it can store?
Explain what are delegates?
How many types of cache are there?
Why SessionID changes in every request in asp.net?
What is the maximum amount of memory any single process on windows can address?
What are the difference between function and stored procedure in .net programming language?
Which library is used by the testers and developers to develop automated tests and create testing tools?
Where sessions are stored in asp.net?
What is state management in asp.net with example?
How does asp.net work?
What is the mvc model?
How to use multiple scriptmanager controls in a web page?
What are the different web pages?