Option Strict
Visual Basic language in general does not require explicit syntax to be used when performing operations that might not be optimally efficient (e.g. late binding) or that might fail at run time (e.g. narrowing conversions). This permissive semantics often prevents detection of coding errors and also affects the performance of the application.
VB.NET enables a programmer to enforce strict semantics by setting this option to On . When used this option should appear before any other code. This option can be set to On or Off . If this statement is not specified by default it is set to Off .
Syntax: Option Strict [On / Off]
When it is set to On it disallows any narrowing conversions to occur without an explicit cast operator late binding and does not let the programmer omit As clause in the declaration statement. Since setting it to On requires explicit conversion it also requires that the compiler be able to determine the type of each variable. Thus it is implied that Option Strict also means Option Explicit.
Visual Basic .NET allows implicit conversions of any data type to any other data type. However data loss can occur if the value of one data type is converted to a data type with less precision or a smaller capacity. Setting this option to On ensures compile-time notification of these types of conversions so they may be avoided.