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 server objects in asp.net?

5 Answers  


What parameters can you pass in the url of the api?

0 Answers  


What is __ requestverificationtoken?

0 Answers  


How to find out what version of asp.net I am using on my machine?

0 Answers  


How many time you can fill dataset in asp.net?

3 Answers   Syntel, Wipro,






hi .net gurus here is my question " how does impersonate in asp.net works? explain with good example"

2 Answers   PennyWise, TCS, Wipro,


By default what is the Asp.Net application login context on IIS 5.0? By default the ASP.Net app runs in the context of a local user ASPNet on IIS version 5. On IIS version 6 on windows 2003 it is called Network service

0 Answers  


To match the two different controls which control would we use ?

2 Answers   Siebel,


What are clr?cts?cls?

4 Answers   e4e, HCL, Microsoft, Tata Communications,


What are the new features implemented in ASP.NET?

0 Answers   TCS,


In a Code-Behind class generally which type of code is found ?

3 Answers   Siebel,


what is view stat how it is use ?

2 Answers   Amazon,


Categories