1.5. The Structure of C# ApplicationsAt the most fundamental level, a C# application consists of source code . Source code is human-readable text written in a text editor. A text editor is like a word processor, but it puts no special characters into the file to support formatting, only the text. A classic text editor is Notepad. Example 1-1 shows an example of a very simple source code file. Example 1-1. A source code file
This program is explained in detail below. For now, observe that the program is readable; it is in normal text. The words may be strange and the layout unusual, but there are no special charactersjust the normal text produced by your keyboard. Once you write your program in an editor, you must compile it. For that, you need a compiler (explained shortly). Once compiled, your program must be run and tested . Although you can perform all of these tasks using Notepad (or another text editor) and various command-line tools, your programming life will be much easier if you use the Integrated Development Environment (IDE) called Visual Studio 2005. Visual Studio 2005 was designed with .NET development in mind, and greatly simplifies the writing of C# program code. This book assumes you are using Visual C# 2005 Express or Visual Studio 2005, both of which provide the Visual Studio 2005 development environment.
|