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

Option Strict On non ammette operandi di tipo Object per l'operatore '<nomeoperatore>'. Usare l'operatore Is per verificare l'identità dell'oggetto.

Un operatore di confronto aritmetico, ad esempio = , viene usato con una o più variabili oggetto quando Option Strict è On.

ID errore: BC32013

Per correggere l'errore

  1. Attivare Option Strict Off se le variabili oggetto contengono valori numerici e si intende usare un confronto aritmetico.

  2. Usare l'operatore Is per verificare l'identità dell'oggetto.

Vedi anche