Is it possibe to create fields in interfaces?

No, Its not possible to create fields in interface. As interfaces will not have any methods implementations, there is no use in having fields.

According to MSDN,

Interfaces consist of methods, properties, events, indexers, or any combination of those four member types. An interface cannot contain constants, fields, operators, instance constructors, destructors, or types. It cannot contain static members.
Is it possibe to create fields in interfaces? Is it possibe to create fields in interfaces? Reviewed by kamal kumar das on May 07, 2012 Rating: 5

No comments:

ads 728x90 B
Powered by Blogger.