About This eBook by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Interacting with the Environment

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

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required