Game Development Reference
In-Depth Information
The first line is a function call that prints Hello World to the system console.
The second line waits for a keypress on the system console. If the second line
wasn't there, the program would run, display Hello World , see there's nothing
else to do, and shut down the program.
Press the green arrow and bask in the Hello World example glory (see
Figure 4.4).
Figure 4.4
The Hello World program.
The results demonstrate that everything is working as expected. It is important to
save this code so it can be preserved for the ages. Go to the File menu and choose
Save All. This will pop up a dialog asking you where to save the file. By default,
this will be in the My Documents folder under Visual Studio 2010; this is fine.
Visual Studio Express Tips
If you typed the Hello World program, you may have noticed that Visual Studio
helps you out with autocomplete and drop-down boxes showing the name-
spaces, classes, and appropriate variables. This is some of the more obvious help
Visual Studio will give. There are also some less obvious features that are worth
highlighting.
Automatic Refactoring and Code Generation
Refactoring is a software development term; it means rearranging or rewriting
parts of a current program to make it clearer, smaller, or more efficient, but not
changing its functionality. Code generation allows Visual Studio to write some
code for you. Visual Studio has a number of tools to help you; it splits them into
two headings: Refactor for changing the code and Generate for automatically
 
Search WWH ::




Custom Search