Option Strict On non ammette operandi di tipo Object per l'operatore '<nomeoperatore>'

Aggiornamento: novembre 2007

Messaggio di errore

Option Strict On non ammette operandi di tipo Object per l'operatore '<nomeoperatore>'. Utilizzare l'operatore Is per verificare l'identità dell'oggetto.
Option Strict On disallows operands of type Object for operator '<operatorname>'. Use the Is operator to test for object identity.

Un operatore di confronto aritmetico come = è utilizzato con una o più variabili oggetto quando Option Strict è impostato su On.

ID errore: BC32013

Per correggere l'errore

  1. Impostare Option Strict Off se le variabili oggetto contengono valori numerici e se si desidera eseguire un confronto aritmetico.

  2. Utilizzare l'operatore Is per confrontare l'identità dell'oggetto.

Vedere anche

Riferimenti

Operatori di confronto (Visual Basic)

Operatore Is (Visual Basic)

Istruzione Option Strict