Export (0) Print
Expand All
Expand Minimize

ConfigurationUserLevel Enumeration

Used to specify which configuration file is to be represented by the Configuration object.

Namespace:  System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

type ConfigurationUserLevel

Member nameDescription
NoneGet the Configuration that applies to all users.
PerUserRoamingGet the roaming Configuration that applies to the current user.
PerUserRoamingAndLocalGet the local Configuration that applies to the current user.

Use ConfigurationUserLevel to specify which configuration file is to be represented by the Configuration object returned by ConfigurationManager.OpenExeConfiguration and WebConfigurationManager.OpenMachineConfiguration.

Application configuration files are in the same directory as the application and have the same name, but with a .config extension. For example, the configuration file for C:\System\Public.exe is C:\System\Public.exe.config.

Applications use a global configuration that applies to all users, separate configurations that apply to individual users, and configurations that apply to roaming users.

The following example shows how to use the ConfigurationUserLevel enumeration.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft