Export (0) Print
Expand All

ApplicationSettingsBase Constructor

Initializes an instance of the ApplicationSettingsBase class to its default state.

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

protected ApplicationSettingsBase()

The default constructor was designed to work under the assumption that there is no component associated with the current settings wrapper class, which derives from ApplicationSettingsBase.

When an instance of a wrapper class is created, inherited code will automatically perform the following actions:

  1. Reflect over the class.

  2. For each property on the wrapper marked with either [UserScopedSettingAttribute] or [ApplicationScopedSettingAttribute], a corresponding SettingsProperty is created.

  3. Each SettingsProperty has some of its properties set based on other attributes that are optionally present on the wrapper's properties, such as the default value or the settings provider.

  4. All other attributes are simply put into an attribute bag, the Attributes property of the SettingsProperty class.

  5. All SettingsProperty objects are added to a SettingsPropertyCollection represented by the Properties property of the ApplicationSettingsBase class. This collection is then passed to the Initialize method.

As implied by step 3 mentioned previously, ApplicationSettingsBase natively works with several property attributes, specifically the following: SettingsProviderAttribute, DefaultSettingValueAttribute, and SettingsSerializeAsAttribute. All other settings attributes are simply passed through to the appropriate underlying provider.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft