Environment variables and command line arguments are both ways for the user to specify run-time settings to a particular application. .NET provides several more ways, including OS favorites like the Registry and special folders, as well as new ways like .config files and isolated storage.

Types of Settings

When saving settings, you should consider several different localities of settings:

  • Application. These settings are shared between all users of an application on the machine. For example, the list of directories in which to search for the assemblies to show in the Add Reference dialog is a per-application setting.[6]

    [6] This setting is stored at HKLM\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders in the Registry.

  • User. These settings ...

Get Windows Forms Programming in Visual Basic .NET now with the O’Reilly learning platform.

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