Type parameter not allowed in 'Implements' clause

An Implements clause in a generic type specifies a type parameter as the member to be implemented.

An Implements clause must specify an interface and a member. It can pass a type parameter to the interface, but it cannot pass it to the member, nor use it as the name of the member.

The following statements can generate this error.

Class c1(Of t)
    Implements i1(Of t)
    Public Sub doSomething() Implements t
End Class

Error ID: BC32056

To correct this error

  • Specify the interface name and a genuine member of the interface following the Implements keyword. You can pass the type parameter to the interface if appropriate.

        Public Sub doSomething() Implements i1(Of t).doSomething
    

See Also

Concepts

Implements Keyword and Implements Statement

Generic Types in Visual Basic

Reference

Implements (Visual Basic)

Type List