Monday, July 04, 2011

Can interface have constructor

An interface can be a member of a namespace or a class. 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. it means in c sharp we can't have constructor in interface but other language like c++ support static constructor in interface. An interface can inherit from one or more base interfaces.
When a base type list contains a base class and interfaces, the base class must come first in the list.

0 comments:

Post a Comment