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

Answers were Sorted based on User's Feedback



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

Answer / eswar

Features are same but implementation are different then we
go for Interface

Features are same and some of the implementations are same
then we go for Abstract.

Is This Answer Correct ?    14 Yes 10 No

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

Answer / 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

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

Answer / pravin more

If U Want to add some modules in ur application in the
feature then u can use abstract class.


---Pravin More

Is This Answer Correct ?    3 Yes 2 No

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

Answer / lenin n c

In abstract we need can create Object for that class and
cannot inherit it.

But in case of interface viceversa

Is This Answer Correct ?    2 Yes 17 No

Post New Answer

More ASP.NET Interview Questions

What is true about application service provider?

0 Answers  


If you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?

1 Answers  


What is enableviewstate?

0 Answers  


What is routing in MVC?

0 Answers   Infosys,


What are sql joins?

0 Answers  


Is string a value type or a reference type?

13 Answers  


How to handle errors in Web API?

0 Answers  


What is viewstategenerator?

0 Answers  


what is advantage of developing in asp.net.why the same can't be developed in Java or other web developemnt tool.what are advantages of developers.

4 Answers   IBM,


differences between class inheritance and interface?

2 Answers  


What is asp.net mvc5? : Asp.Net MVC

0 Answers  


What are the Types of chaching. How to implement caching

0 Answers   Microsoft,


Categories