In the rest of this chapter we'll explore the predefined elements of the C# language as we implement a small program called WordCount. WordCount opens a user-specified text file and calculates the number of occurrences of each word within the file. The results are sorted in dictionary order and written to an output file. In addition, the program supports two command-line options:
-t causes the program to turn a trace facility on; by default, tracing is off.
-s causes the program to calculate and report the amount of time it takes to read the file, process the words, and write the results; by default, timings are not reported.
Our first task in Main() is to access the command-line arguments passed in ...