'<membername>' cannot implement '<interfacename>.<interfacemembername>' because they differ by type parameter constraints

A generic event, property, or procedure attempts to implement a similar member defined in an interface, but they have different constraint lists on their type parameters.

To implement an interface member, the implementing member must match not only the complete signature of the interface member, but also the passing mechanism of each parameter.

To implement a generic interface member, the implementing member must additionally match the number of type parameters and the constraint list of each one.

For details on interface implementation, see Implements Keyword and Implements Statement.

Error ID: BC32078

To correct this error

  • If you intend to implement the interface member, revise the type parameter constraints to exactly match those of the interface member.

  • If the type parameter constraints must remain as you have them, you cannot implement the interface member in this declaration. Remove the Implements (Visual Basic) keyword from the declaration.

See Also

Concepts

Generic Types in Visual Basic

Interface Implementation Examples in Visual Basic