Udostępnij za pośrednictwem


Type argument '<typeargumentname>' does not satisfy the 'Structure' constraint for type parameter '<typeparametername>'

A type argument supplied to a generic type does not satisfy the value type constraint on its corresponding type parameter.

A constraint list imposes requirements on the type argument passed to the type parameter. If you do not include any specific class or interface in the constraint list, you can impose a general requirement by specifying one of the following:

You cannot specify both Structure and Class for the same type parameter, and you cannot specify either one more than once.

Error ID: BC32105

To correct this error

  • Select a type argument of any value type.

See Also

Tasks

How to: Use a Generic Class

Concepts

Generic Types in Visual Basic

Value Types and Reference Types