This documentation is archived and is not being maintained.

Variable '<variablename>' is used before it has been assigned a value (Visual Basic Error)

Visual Studio 2008

A variable is being used before it has been assigned a value, resulting in a NullReferenceException.

Error ID: BC42109

To correct this error

  • Make sure the variable has been assigned a value.

Show: