0

Possible Duplicates:
Interfaces: Why can't I seem to grasp them?
What is an Interface

At this time, all I know about Interface is that it contains classes, ... like a namespace. What is its purpose? Why don't we just use Namespace?

Thank you.

2
  • 1
    No, an interface doesn't contain classes. It contains methods, properties etc.
    – Jon Skeet
    Apr 21, 2011 at 10:18
  • An interface is a contract. It tell's you how a class must act.
    – jgauffin
    Apr 21, 2011 at 10:20

2 Answers 2

0

From MSDN:

An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that implements the interface,

0

See this duplicate post:

What is an Interface

An interface is like a template design for a class that contains no data or implemetnation; only definitions for methods, properties etc. These are abstract and cannot be instantiated but can be inherited from at which point all specified methods etc must be implemented by the concrete class inheriting the interface.

Not the answer you're looking for? Browse other questions tagged or ask your own question.