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 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.

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# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.