For historical reasons, machine language is also known as assembly language. In the old days, each manufacturer provided a program called an assembler that would convert special words into individual machine instructions. Thus, you might write something really cryptic like MOV AX,CX. (That’s an actual Intel processor instruction, by the way.) The assembler would convert that instruction into a pattern of bits corresponding to a single machine instruction. Humans and computers have decided to meet somewhere in the middle. Programmers create their programs in a language that is not nearly as free as human speech but a lot more flexible and easy to use than machine language. The languages that occupy this middle ground — C#, for example — are called high-level computer languages. (High is a relative term here.)

What is a program? In one sense, a Windows program is an executable file that you can run by double-clicking its icon. For example, the version of Microsoft Word that I’m using to write this book is a program. You call that an executable program, or executable for short. The names of executable program files gener- ally end with the extension .exe. But a program is something else, as well. An executable program consists of one or more source files. A C# program file is a text file that contains a sequence of C# commands, which fit together according to the laws of C# grammar. This file is known as a source file, probably because it’s a source of frustration and anxiety.

The C# programming language is one of those intermediate languages that programmers use to create executable programs. C# fills the gap between the powerful-but-complicated C++ and the easy-to-use-but-limited Visual Basic — well, versions 6.0 and earlier, anyway. (Visual Basic’s newer .NET incarnation is almost on par with C# in most respects. As the flagship language of .NET, C# tends to introduce most new features first.) A C# program file carries the extension .CS

Download Creating Your First C# Windows Program