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 Razor View Engine

0 Answers   HCL,


Is session server side or client side?

0 Answers  


What is the postback property in asp.net?

0 Answers  


repeater and gridview diff? Why is repeater fast than gridview?

3 Answers   TCS,


One of the properties of the Web Part has an incorrect format. Windows SharePoint Services cannot deserialize the Web Part. Check the format of the properties and try again. - this error is occured in Sharepoint 2007 while deploy the web part

1 Answers   WebInfo,






What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

2 Answers  


What base class do all Web Forms inherit from?

8 Answers  


Explain about solution explorer window?

0 Answers  


Can the action attribute of a server-side tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page?

1 Answers  


What are Master Pages in ASP.NET? or What is a Master Page?

0 Answers   MCN Solutions,


how to pass session value one url to another url.my code if session("user")="abc" then response.redirect("www.abc.com\client\home.aspx") end if. so how to pass value of session in browser url

1 Answers  


Which namespace is used by ado.net?

0 Answers  


Categories