Datasheet

To avoid confusion and long debugging sessions, you should always set Option Explicit On and Option
Strict On. You can turn them on for a project using the project page. To make them on by default for new
projects, open the Tools menu and select Options. Open the Projects and Solutions folder, select the VB
Defaults page, and turn the options on, as shown in Figure 1-15.
Figure 1-15: The Projects and Solutions folder’s VB Defaults page lets you set default
values for Option Explicit and Option Strict.
The final compiler directive, Option Compare, can take the values
Binary or Text. If you set Option
Compare to
Binary, Visual Basic compares strings using their binary representations. If you set Option
Compare to
Text, Visual Basic compares strings using a case-insensitive method that depends on your
computer’s localization settings. Option Compare Binary is faster, but may not always produce the
result you want.
If you select a solution and then invoke the Project menu’s Properties command, Visual Studio displays
the Solution Properties Pages dialog shown in Figure 1-16. Select an item on the left to view, and modify
the corresponding values on the right.
Build
The Build menu, shown in Figure 1-17, contains commands that let you compile projects within a
solution.
18
Chapter 1
571982 ch01_2.qxd 1/19/06 1:15 PM Page 18