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
Can you explain the basic use of dataview?
Which data type does the rangevalidator control support?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?
How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.
Is asp.net mvc still used? : Asp.Net MVC
COM+ Used ________________ Isolation Level
What are themes and skins in 2.0, explain usage scenario?
Explain how dot net compiled code will become platform independent?
What is asp.net response object?
What is the usage of DelegatingHandler?
How does windows service lifecycle differ from a .standard. Exe?
What is difference between Fragment Caching and Page Caching in ASP.NET?
What is custom events? How to create it?
What is the difference between client-side and server-side validations in ASP.NET?
What is data cache in sql server?