15. Settings

SOME WINDOWS FORMS APPLICATIONS can happily operate in a microcosm, but most real-world applications rely on information from the environment around them. This information can come from many sources and is dictated by an application, its users, and even the machine on which an application executes.

.NET provides several specialized classes that applications can use to inspect their operational environment, as well as a comprehensive system for managing application- and user-specific settings. There are several additional options along these lines, including environment variables, command line arguments, .config files, the Registry, and special folders.

The Application Environment

During its lifetime, an application runs in a certain ...

Get Windows Forms 2.0 Programming 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.