Export (0) Print
Expand All

ApplicationScopedSettingAttribute Class

Specifies that an application settings property has a common value for all users of an application. This class cannot be inherited.

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

[AttributeUsageAttribute(AttributeTargets.Property)]
public sealed class ApplicationScopedSettingAttribute : SettingAttribute

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

The ApplicationScopedSettingAttribute indicates that a property should be considered an application-level setting, and that appropriate storage decisions should be made accordingly by the settings provider.

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

System.Object
  System.Attribute
    System.Configuration.SettingAttribute
      System.Configuration.ApplicationScopedSettingAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft