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 Model-View-View Model?

0 Answers   MCN Solutions,


What are the different methods that are used during the page load?

1 Answers   Siebel,


In which module you have worked in your .net project explain?

1 Answers   TechSolution,


Why do we use web config?

0 Answers  


What is data grid view in asp.net?

0 Answers  






What is a 307 redirect?

0 Answers  


Explain login control and form authentication.

0 Answers  


Explain how can we inherit a static variable?

0 Answers  


Where is asp.net session stored?

0 Answers  


Explain the different types of assemblies?

0 Answers  


Can you explain what inheritance is and an example of when you might use it?

1 Answers   Sports Interactive,


What are the different authentication modes in asp.net?

0 Answers  


Categories