Please find important properties of interfaces of c#.

1. An interface cannot be instantiated directly.

2. Interface can contain events , indexers , methods and properties ; or any combination of those given before.

3. Interface contain no implementation of methods.

4. Classes and struct can inherit from more than one interface.

5. An interface can itself inherit from multiple interface.

6. Everything should be public in interfaces.

7. An interface is like an abstract base class , any non abstract type inheriting the interface must implementing all its members.

8. Class has to implement all the methods from interface ; if class is implementing the interface.

9. Interfaces cannot contain fields.

10. An interface an inherit from other interfaces.

I will post some detailed examples on this…

Thanks

Pawan

Pawankkmr@gmail.com

Advertisements