joe_pool_is Posted January 29, 2009 Posted January 29, 2009 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? Quote Avoid Sears Home Improvement
Administrators PlausiblyDamp Posted January 29, 2009 Administrators Posted January 29, 2009 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. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
joe_pool_is Posted January 29, 2009 Author Posted January 29, 2009 Thanks for the link and the summary! Quote Avoid Sears Home Improvement
Nate Bross Posted January 29, 2009 Posted January 29, 2009 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. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.