Option Strict.

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
in vb.net there are two compiler options you should turn ON
Option Explicit and Option Strict

Option Explicit On means that all variables that you use have to to be declared first, if you don't declare them you get a compile error. make sure it's ON

Option Strict On means that vb wont auto convert variable type ie DecAmount = intAmount instead you have to convert it intAmount = Convert.ToDecimal(intAmount) you're program will run faster if you convert the types yourself, option strict forces type conversion. for type conversion there is also the CType function as well.
 
Top Bottom