Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I was adding a new form to an existing project in VS2005 the other day, and I took some time to look at all of the different types of objects I could include.

 

One item in the list was an "Interface". I tried looking in the help under selecting items, but there was no information on what an "Interface" was.

 

Could someone tell me what an Interface is?

  • Administrators
Posted

http://msdn.microsoft.com/en-us/library/ms173156.aspx is probably worth a read as it goes into some detail.

 

In a nutshell however an interface is a way of achieving polymorphism as it defines a standard set of methods that classes can implement, other code however can just target the interface and not care about the exact type of object it is dealing with.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
A simple way to think about it is that an Interface is like a contract. Any class that implements or extends an Interface is guarenteed to implement all members of the Interface, it may have more, but it will have everything defined in the Interface.

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...