I l @ ve RuBoard |
In keeping with programming tradition, Listing D.1 outlines our first program: "Hello, world". Listing D.1 The classic "Hello, world" program, hello.cs.using System; class Hello { static void Main() { // write "Hello, world!" to the screen Console.WriteLine("Hello, world!"); } } Developers with experience in ASP/VBScript should note that the C# language is case sensitive and requires a semicolon at the end of statements like JavaScript. By following convention, we save the source code for our program with a .cs file extension, hello.cs . We can compile our program using the .NET command-line compiler, csc.exe , using the following syntax: csc hello.cs The output of this directive produces our executable program, hello.exe . The output of the program is as follows : Hello, world! From this basic example, we can glean several important points:
|
I l @ ve RuBoard |