Answer to Question #44520 in C# for avijit

Question #44520
why are interfaces used in c#?
1
Expert's answer
2014-07-28T11:09:56-0400
An interface looks like a class, but has no implementation. The only thingit contains are declarations of events, methods and/or properties.

Interfaces Summary:
An interface has the following properties:

- An interface is like an abstract base class. Any class or struct that implements the interface must implement all its members.
- An interface can't be instantiated directly. Its members are implemented by any class or struct that implements the interface.
- Interfaces can contain events, indexers, methods, and properties.
- Interfaces contain no implementation of methods.
- A class or struct can implement multiple interfaces. A class can inherit a base class and also implement one or more interfaces.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS