Interface in C#…………………

A class which have all method as abstract are knows as interface.
This type of class must be replaced with keyword  “interface”.
e.g. public interface Car
{
	Void  power();
	Void  engine();
}
We cannot create object of interface.
In order to use interface, a subclass must create object of interface.
Interface is also known as Contract for subclass.
We can use interface for multiple inheritance.
Interface cannot contain normal method.

SHARE THE KNOWLEDGE


  

Advertisements

About Dinesh

I am engineering student........ I am selected in Microsoft Student Partner as MSP............

Posted on August 28, 2011, in .NET, C#, Knowledge. Bookmark the permalink. Leave a comment.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: