System.Configuration.UserScopedSettingAttribute Class

Specifies that an application settings group or property contains distinct values for each user of an application. This class cannot be inherited.

See Also: UserScopedSettingAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Property)]
public sealed class UserScopedSettingAttribute : SettingAttribute

Remarks

Application settings properties have a scope that is based either at the application or the user level. As the categories imply, application-scoped properties present uniform values to all users of the application, whereas user-scoped properties have dedicated values for each user of the application.

The System.Configuration.UserScopedSettingAttribute indicates that a property should be considered a user level setting, and that appropriate storage decisions should be made accordingly by the settings provider.

A scope attribute is required for each application settings property. If a property is not applied with either a System.Configuration.ApplicationScopedSettingAttribute or System.Configuration.UserScopedSettingAttribute, the property is ignored by the settings provider—it is not serialized. It is invalid, however, to apply both attributes to the same settings property. Such an attempt will cause a System.Configuration.ConfigurationErrorsException to be thrown.

Requirements

Namespace: System.Configuration
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0