What is Option Strict used for?- Option Strict On enables type checking at design time and prevents type mismatch bugs. - It restricts implicit data type conversions to only widening conversions, disallows late binding, and disallows implicit typing that results in an Object type.
Syntax:
Option Strict { On | Off }
The following conditions cause a compile-time error when Option Strict On or Option Strict appears in a file:
1. Implicit narrowing conversions 2. Late binding 3. Implicit typing that results in an Object type
|