Remember that there are two levels.
Option Explicit Option Strict
The main difference between the two is that Option Strict disables the automatic conversion of VB of different data types. You must explicitly use CType or another data conversion function to assign a variable to another type.
I use VB with 1.0, and although I see that this is a point of view, I think that Strict is overly jealous paritcularily when working with objects that implement or inherit different interfaces and classes.
First, I started with Strict, and if it starts to bother you, then go down to Explicit. But in no case both will not turn off, so this is crazy and excessive debugging time.
Over the years, with VB, I quite often use Double for all floating point variables. This way you avoid many problems with rounding and loss of precision. In VB6, I used long because it was a 32-bit integer, but Integer works just as well as it does in .NET, since it is Int32. I also recommend using Int32, Int16, etc. Instead of Integer, Long, etc., if Microsoft decides to override these keywords.
RS Conley Oct 21 '08 at 17:14 2008-10-21 17:14
source share