Running the Sample

Based on the example in Chapter 3, you should be able to write our trivial console application’s code in an editor of choice, compile it, and run it. To illustrate matters one more time, we’ll go through the motions of compiling the application from the command line and show its use. Figure 4.2 shows the use of the little application we’ve written and compiled.

Figure 4.2. Compiling and running the application.

image

After having written the code in Notepad, saving it to a file with a .cs extension (a convention, not a requirement), we called the C# command-line compiler csc.exe on it. Next, we invoked the resulting executable passing ...

Get C# 4.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.