Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 23rd, 2011, 12:11 PM
Authorized User
Join Date: Nov 2010
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Post What is interface?

Hi to All,

Please define me the interface concept in oop and where can I use it, and difference between class and interface.

Does interface improved our application performance (in the mean of reduction of code)?

Please help me.

Old January 26th, 2011, 01:49 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik

Interface is a contract which guarantees client(consumer) how your classes or structs are going to behave.They consists only method skeleton and no implementations.

->Interface can be used when you cannot inherit from a class like for structs.
->More than one interface can be inherited thus supporting multiple inheritance in .Net
->Interface helps in defining a common functionality across multiple types.
->Used in plug-n-play architecture.

& visit http://csharptopicwiseques.blogspot....face-ques.html for more detail
Hovik Melkomian.
The Following User Says Thank You to melvik For This Useful Post:
smfarooq (January 27th, 2011)
Old January 27th, 2011, 07:19 AM
Authorized User
Join Date: Nov 2010
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Post Hi


Thanks for reply Sir melvik,

But I am little confused that what does that mean?

"Interface can be used when you cannot inherit from a class like for structs"

Pleas define me,

Old March 9th, 2011, 07:36 AM
Registered User
Join Date: Sep 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Explicit Interface Method in C#

When any type is loaded by CLR then all method of the class and all inherited public methods and interfaces implementation methods are added to method table.
For example i have created a class Test which is implementing one interface IFormattable and it has only one method ToString().
Old May 4th, 2013, 06:54 AM
Authorized User
Join Date: Jun 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

An Interface is a reference type and it contains only abstract members such as Events, Methods, Properties etc. It contain only declaration for its members and implementation defined as separate entities from classes.


Old May 7th, 2013, 02:18 AM
Posts: n/a
Default Interface

Interface is A boundary across which two independent systems meet and act on or communicate with each other. In computer technology, there are several types of interfaces.

user interface - the keyboard, mouse, menus of a computer system. The user interface allows the user to communicate with the operating system. Also see GUI.
software interface - the languages and codes that the applications use to communicate with each other and with the hardware.
hardware interface - the wires, plugs and sockets that hardware devices use to communicate with each other.
To connect with or interact with by means of an interface.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Role of interface ajit Java Databases 1 July 1st, 2006 08:15 PM
Multilanguage Interface tiyyob .NET Framework 2.0 1 June 14th, 2006 01:03 AM
user interface Kasia Access VBA 6 March 14th, 2005 09:52 AM
interface inheritance draganmit VB.NET 2002/2003 Basics 6 April 29th, 2004 09:40 AM
Regarding Interface ndr1977 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 July 30th, 2003 09:56 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.