Type argument '<typeargumentname>' is declared 'MustInherit' and does not satisfy the 'New' constraint for type parameter '<typeparametername>'

A generic type is invoked with a MustInherit class as a type argument, while the corresponding type parameter is declared with the New constraint.

The New constraint requires that the type passed in the corresponding type argument must support the creation of objects. However, an abstract class, that is, a class declared as MustInherit, does not expose any constructors because you cannot create any objects from it.

Error ID: BC32082

To correct this error

  1. If the class used in the type argument does not need to be abstract, then remove the MustInherit keyword from its declaration.

  2. If the class used in the type argument needs to be abstract but does not need to be used to construct the generic type, then pass a different class in the type argument.

  3. If the corresponding type parameter does not need to create any objects from the type passed to it, then remove the New constraint from its declaration.

Community Additions