Type '<typename>' cannot inherit from a type parameter

A class or interface includes an Inherits Statement specifying a generic type parameter.

A type cannot inherit from a type that is not yet defined. Inheritance involves the ability to reuse members of the base class, which in turn requires that these members be defined. A generic type parameter is a placeholder that is to be replaced by a specific type supplied by a type argument. Therefore, a type cannot inherit from the placeholder.

Error ID: BC32055

To correct this error

  • If the inheriting type must inherit from another type, use a specific type instead of a type parameter.

  • If the base type must be represented by a generic type parameter, no other type can inherit from it. Remove the Inherits Statement.

See Also

Concepts

Generic Types in Visual Basic

Other Resources

Inheritance in Visual Basic