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 the transport protocol you use to call a Web service?

2 Answers   Siebel Systems,


What is application session?

0 Answers  


What are the differences between application object and session object?

0 Answers  


Explain the use of duration attribute of @outputcache page directive.

0 Answers  


You have multiline textbox and submit button. if you paste xml content into multiline textbox and hit submit button. what action will perform?

6 Answers   D&B,






What is the difference between CLICK and MOUSE DOWN Event ?

0 Answers   MCN Solutions,


Explain the role of global.asax?

0 Answers  


True or False: A Web service can only be written in .NET?

5 Answers  


What is active web pages?

0 Answers  


Caching techniques in .NET?

2 Answers   Microsoft,


If i have 1000 records in dataset, how to do paging?

2 Answers   Mind Tree,


Input:http://www.allinterview.com/forms/questionform.php Output:http://www.allinterview.com/forms/questionform Write c# program to get the above desired output for the given Input.....

3 Answers   Bally Technologies,


Categories