'Declare' statements are not allowed in generic types or types contained in generic types

A Declare statement appears as part of a generic class or structure, or a class or structure declared within a generic class or structure.

Visual Basic and the .NET Framework do not currently support any combination of external references and generic types. The compiler needs all the parameters and the return type of an external procedure to call it correctly.

Error ID: BC32075

To correct this error

  • Move the Declare statement outside the scope of any generic type, or remove it altogether.

See Also

Concepts

Generic Types in Visual Basic

Reference

Declare Statement