Udostępnij za pośrednictwem


Local variable '<variablename>' is already declared in the current block

Two variables with the same name are declared in the same block (which can be a procedure or a control block such as If...Then).

Error ID: BC30288

To correct this error

  • Move one of the declarations to a different block, or change the name of one of the variables.

See Also

Concepts

Resolving a Reference When Multiple Variables Have the Same Name

Shadowing in Visual Basic