Show/Hide Toolbars

XSharp

Accessor 'accessor' cannot implement interface member 'member' for type 'type'. Use an explicit interface implementation.

 

Suggested: This error can occur when implementing an interface that contains method names which conflict with the auto-generated methods associated with a property or event. The get/set methods for properties are generated as get_property and set_property, and the add/remove methods for events are generated as add_event and remove_event. If an interface contains either of these methods, a conflict occurs. To avoid this error, implement the methods using an explicit interface implementation. To do this, specify the function as:

 

 

 

 

Example

 

The following sample generates XS0686:

 

 

// XS0686.prg  
 

 

Example

 

This error can also occur when declaring events. The event construct automatically generates the add_``event and remove_``event methods, which could conflict with the methods of the same name in an interface, as in the following sample:

 

 

// XS0686b.prg