Interface

Interface are contracts, it defines common set of members that all classes that implement the interface must provide.

Interfaces can be made up of methods, properties (getter/ setter), events, indexers. Interface does not allow fields.

Interface can inherit other interfaces
Interfaces can be inherited by struct
interfaces support multiple inheritance
interface methods are explicitly abstract ad public

Implicit and Explicit interfaces

An interface cannot be instantiated directly.

public is not a valid accessibility for an explicit implemented interface

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: