Enforces strict type semantics to restrict implicit type conversions.
/optionstrict [+ | -]
The default for this option is /optionstrict+ or /optionstrict. Only widening type conversions can be done implicitly when strict type semantics are being enforced. Implicit narrowing type conversions, such as assigning a Decimal type object to an integer type object will be reported as an error. Specify /optionstrict- if you want to use permissive type semantics.
Compile test.vb
using strict type semantics:
vbc /optionstrict+ test.vb