.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

What is Interface?

Posted By: PankajGupta     Posted Date: August 05, 2009    Points:2   Category :C#
What is Interface? & how to use it in a Class or program?

Author: Venkat             
Posted Date: August 05, 2009     Points: 5   

An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that implements the interface.

For Example please refer this link


Mark As Answer if this solve your problem
Warm Regards,
Author: Amit Mehra             
Posted Date: March 22, 2010     Points: 5   


An interface looks like a class, but has no implementation. It contains definitions of events, indexers, methods and properties. An interface inherited by classes An interface inheritance defined with keyword "interface". In C# Interface Inheritance also known as multiple inheritances.


Please "Mark As Answer " if this post help you.
Author: Manas Ranjan Das             
Posted Date: December 07, 2011     Points: 20   

Implementing an interface allows a class to become more formal about the behaviour and implementation. Interfaces form a contract between the class and the outside world this gives very good abstraction about the object to client. If your class claims to implement an interface, all methods defined by that interface must implement in your class before the class will successfully compile.
1. Provides flexibility in implementing the operations for the derived classes.
2. Avoid conflicts when more than one interface is derived in a class.
3. Multiple inheritances can be possible in case of interface

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend