NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

8.1.5 Interface implementation

Methods can implement interface methods. To implement an interface method, a method declaration specifies the Implements keyword and references the name of the interface member. The method is implicitly final unless it is declared to be abstract or overridable. It is an error for a member implementing an interface member to be shared. A method's accessibility has no effect on its ability to implement methods. Like a non-abstract type, an abstract type must provide implementations of all members of the interfaces that are listed in the base type list of the type, but these methods may be abstract.

For an interface implementation to be valid, the containing type must name an interface in its implements list that contains a member whose fully qualified name, type, and parameter types exactly match those of the interface member implementation. A single member can implement multiple matching interface members.

The name of an interface member in the implements list must include a reference to the name of an interface in the implements list. The only exception is if the implemented method is unavailable all of the interfaces in the implements list because of multiple inheritance. In this case the implementing method must explicitly reference a base interface the method is available in, not the derived interface. That is to say, if I1 and I2 contain a member M, and I3 inherits from I1 and I2, then a type implementing I3 will implement I1.M and I2.M. If an interface shadows multiply inherited members, then an implementing type will have to implement the inherited members and the member(s) shadowing them.

MethodImplementsClause ::= [ Implements MethodMemberNameList ]
MethodMemberNameList ::=
 MethodMemberName |
 MethodMemberNameList , MethodMemberName