Today’s programs don’t stand on their own. They often have to interact with the outside world in a variety of ways. While we explore I/O in Chapter 28, “Working with I/O,” one form of interaction is covered here: talking to “the environment.”
The concept of an environment is hardwired in the operating system. Every program has access to it, containing both global information as well as some information that’s specific to the program’s invocation (such as the command line used). In .NET, all this information is made available through the (static) class
Instead of giving a dump of what can be read in MSDN documentation, let’s limit ourselves to a few examples. First of all, here’s some general information ...