C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Interfaces


Posted Date: 13 Jun 2008    Resource Type: Definitions    Category: General
Author: shakti singh tanwarMember Level: Diamond    
Rating: Points: 5



In layman’s terms we can say that interface is a pure abstract class with all methods abstract and no data members.
Interview definition:-
Interface is a contract between two parties.The contract is that all the parties implementing interfaces must implement all the methods declared in interfaces failure in doing which the class will be an abstract class.

Here is an example of interface:-
public interface myinterfacse
{
void foo();

}
public interface myinterfacse1 : myinterfacse
{
void foo2();

}
An interface can implement other interfaces and a class can implement multiple interfaces.




Responses

Author: chaithanya    14 Jun 2008Member Level: Silver   Points : 1
Nice post which will be useful to many people who are new to this concept of Interface.


Author: Nanak Deep    18 Jun 2008Member Level: Bronze   Points : 2
>interface keyword is used
>Interface is implemented
>multiple implementation
>Members are by default public
>Interface cannot contain virtual, public functions
>Cannot use access modifiers with functions
>Cannot have data members or fields
>Necessarry to implement all its functions in child class
>Functions can not have body or definitions, abstract

thanx sir


Author: deepak kumar    19 Jun 2008Member Level: Bronze   Points : 0
ok for basic knowledge about the interface


Author: Ashish verma    19 Jun 2008Member Level: Bronze   Points : 2
sir,
It was really a nice piece of coding.
As usual this article also helps us
in building concepts about interface.
Keep on posting more articles.
Thanks for now.


Author: Bunty    20 Jun 2008Member Level: Diamond   Points : 2
Hi Shakti,
Nice article on interface.
You can elaborate in much useful manner such as where to implement interface.
And Why there is need to go for interface.
Just like .Net and Java doesn't support multiple inheritence,that can be achieved using interface.
Keep sending.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Stored Procedures
Previous Resource: How to seperate comma from a string in MYSQL
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use