June 2006
Intermediate to advanced
1344 pages
42h 52m
English
Visual Basic provides several options for controlling the way the compiler handles types. These options can help you eliminate such errors as those caused by narrowing conversions. The first option is Option Explicit, which is set to On by default—it has been enabled in the programs we created in Chapters 2–6. Option Explicit forces you to explicitly declare all variables before they are used in a program. Forcing explicit declarations eliminates various errors. For example, when Option Explicit is set to Off, the compiler interprets misspelled variable names as new variables and implicitly declares them to be of type Object. (Class Object is the base type of all types in Visual Basic. We will discuss ...
Read now
Unlock full access