Tutorial by Examples

Option Strict On prevents three things from happening: 1. Implicit Narrowing Conversion Errors It prevents you from assigning to a variable that has less precision or smaller capacity (a narrowing conversion) without an explicit cast. Doing so would result in data loss. Dim d As Double = 123.4 ...
You can switch it On at the Module/Class Level by placing the directive at the top of the code file. Option Strict On You can switch it on at the project level via the menu in Visual Studio Project > [Project] Properties > Compile Tab > Option Strict > On You ...

Page 1 of 1