Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ApplicationSettingsBase Constructor (IComponent, String)

Initializes an instance of the ApplicationSettingsBase class using the supplied owner component and settings key.

Namespace:  System.Configuration
Assembly:  System (in System.dll)
protected ApplicationSettingsBase(
	IComponent owner,
	string settingsKey
)

Parameters

owner
Type: System.ComponentModel.IComponent

The component that will act as the owner of the application settings object.

settingsKey
Type: System.String

A String that uniquely identifies separate instances of the wrapper class.

ExceptionCondition
ArgumentNullException

owner is null.

The IComponent object specified by the owner parameter acts as the owner of the current instance of this applications settings class. During the initialization of the settings wrapper class derived from ApplicationSettingsBase, the owner's site is queried for a ISettingsProviderService. If one exists, it is used in preference to native settings provider for all the properties of the wrapper class, as specified by the SettingsProviderAttribute.

This constructor initializes the SettingsKey property to the value of the settingsKey parameter. This property is useful in disambiguating different instances of the wrapper class in the same application domain.

For information about how reflection is used during the instantiation of a wrapper class, see the default ApplicationSettingsBase() constructor.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, 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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.