INTERFACE-ENDINTERFACE

Declaring an interface

 

WNSupported in Synergy .NET on Windows

 

 

[PUBLIC] [PARTIAL] INTERFACE name[<T[(constraints)], ...>] 
&        [EXTENDS base_interface, ...]     
  member_def
  .
  .
  .
ENDINTERFACE

Arguments

PUBLIC

(optional) Access is not restricted.

PARTIAL

(optional) The interface definition can be separated into two or more definitions that will be compiled together as a single definition.

name

The name of the interface to declare.

T

A generic type parameter, which indicates the interface is a generic type and which acts as a placeholder for which an actual type will be substituted when the member is used. Note that you can use any unused letter (not just T). See Generic types (.NET) for more information.

constraints

One or more of the following constraints:

Multiple constraints must be separated by commas. See Constraints for more information.

EXTENDS base_interface

(optional) The interface will extend the specified base interface and will thus inherit members from that base interface.

member_def

The declaration of a method prototype, property or indexer prototype, or event. You can specify as many member definitions as you want, although you must specify at least one.

Discussion

Methods, properties, or indexer accessors that have an implementation cannot be specified as members. By default, members within an interface have PUBLIC accessibility and are VIRTUAL and non-STATIC.

When an interface extends a base interface, it inherits all members from the base interface as well as all members the base interface inherits from its parent, in recursive fashion.

Using the PARTIAL modifier makes it possible to split the definition of an interface over two or more source files.

See also

Examples

public interface iface3 extends iface1, iface2
        method func1, i4
        endmethod
        method func2, void
                p1, i4
        endmethod
endinterface