Enforces strict type semantics to restrict implicit type conversions.
/optionstrict[+ | -]
When /optionstrict+ is in effect, only widening type conversions can be done implicitly. Implicit narrowing type conversions, such as assigning a Decimal type object to an integer type object, are reported as errors.
The following code compiles test.vb using strict type semantics:
vbc /optionstrict+ test.vb