Interface Concept In C Sharp


1)   We use an interface in C# to achieve the concept of multiple inheritance (runtime polymorphism).
2)   An interface is a reference type just like a  abstract class but with some difference.
3)   An interface is a contract that just declare the members (methods,properties,events) but not define them.
4)   A class that implement an interface must define all the interface members.
5)   By default all the members of an interface is "public" and "abstract".
6)   An interface does not contain fields, constructors and destructors.
7)   An interface member cannot be declared as static.
8)   Classes and Structs can implements multiple interface.
9) An interface can also implement multiple interface.
10) We cannot create an object of an interface.
11) We can implement an interface implicitly and explicitly.

Interface Concept In C Sharp Interface Concept In C Sharp Reviewed by Baljeet Singh on 05:49 Rating: 5

No comments:

Powered by Blogger.