Local variables within generic methods cannot be declared 'Static'

The declaration of a local variable within a generic procedure specifies Static.

Visual Basic and the .NET Framework do not currently support any combination of static variables and generic procedures.

Error ID: BC32068

To correct this error

  • Remove the Static keyword from the variable declaration.

See Also

Tasks

How to: Lengthen a Variable's Lifetime

Concepts

Generic Types in Visual Basic

Generic Procedures in Visual Basic

Reference

Static (Visual Basic)