Datasheet
Part I: Getting Started
16
After you have positioned the text within the label at the right place, the form should look like what is
shown in Figure 1 - 15 . Notice how the text in the label object is now centered.
Figure 1 - 15
Running the Program
This is all that you want to do at the present time to test your C# installation. If you can run the program
at this point, it ’ s pretty certain that you have installed C# correctly. There are two simple ways to run a
program. The easiest is to press the F5 key. If you do that, the program should appear on the screen in a
few moments with our message centered in the label object.
The second way is to click the Run Program icon. If you look carefully at Figure 1 - 15 , right below the
Window menu option near the top of the form you can see a small triangle. (On your screen, it appears
green. The Run icon is also labeled in Figure 1 - 7 .) Click that green triangle and the program begins
execution.
If your program does not run correctly and you ’ re not getting an error message from within Visual
Studio, go back to the start of the installation process and check to make sure you followed each step
correctly. Likewise, if you are getting an error message from Visual Studio, you performed some step in
the coding process incorrectly. Just go back to the beginning of the “ A Test Program Using C# Express ”
section of this chapter and check each step to make sure you followed the correct sequence.
ISBN: 978-0-470-26129-3 I Title: Beginning C# 3.0 : An Introduction to Object Oriented Programming I SKU: 9785CH0009874