What is the use of interface?

Posted by balajirnaukri-12656 under C# on 11/15/2012 | Points: 10 | Views : 1166 | Status : [Member] | Replies : 2
Can any one explain me what is the exact use of interface I surfed a lot.Igot only these kind of answers

1.Mainly used to create a loosely coupled system.

2.create a polymorphic behaviour

Can anyone explain me what is the exact use?????

Thanks and Regards
Balaji.R
ASP.NET Devloper
Solve-IT corp



Responses

Posted by: Deepraj on: 11/15/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Balaji,
If we have some set of methods which we think should be implemented definitely in more than one class then we go for interfaces.
Interface contains methods which should be implemented in the class that derives it.
Abstract class is something for which all methods are not compulsorily implemented in the class that derives it.
For more info refer
http://www.codeproject.com/Articles/18743/Interfaces-in-C-For-Beginners

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sravya on: 11/17/2012 [Member] Starter | Points: 25

Up
0
Down
Hi..

Please go through this link.It will help you
http://stackoverflow.com/questions/2026054/why-do-we-use-interface-is-it-only-for-standardization

Regards
Sravya

balajirnaukri-12656, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response