Type or 'New' expected

A type parameter in the declaration of a generic type introduces a constraint list with the As keyword but does not specify a valid constraint.

A constraint on a type parameter must be a valid class or interface, or one of the keywords Class, Structure, or New. If you specify an invalid constraint or none at all, the compiler generates this error.

Error ID: BC32092

To correct this error

  1. Determine how the type parameter should be constrained and specify the appropriate constraint in the constraint list.

  2. If you intend to constrain the type parameter by a class or interface, make sure the constraint spells it correctly.

  3. Remember to separate multiple constraints on a single type parameter with commas, and to enclose the constraint list in braces ({ }).

See Also

Concepts

Generic Types in Visual Basic

Reference

Class (Visual Basic)

Structure (Visual Basic)

New (Visual Basic)

Type List