This documentation is archived and is not being maintained.

SettingsProvider.SetPropertyValues Method

Sets the values of the specified group of property settings.

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

public abstract void SetPropertyValues(
	SettingsContext context,
	SettingsPropertyValueCollection collection


Type: System.Configuration.SettingsContext
A SettingsContext describing the current application usage.
Type: System.Configuration.SettingsPropertyValueCollection
A SettingsPropertyValueCollection representing the group of property settings to set.

ApplicationSettingsBase contains the Save method, which is called to persist the values of all of its settings properties. This method enumerates through all the settings providers associated with its settings properties, and calls the SetPropertyValues method for each SettingsProvider to perform the actual serialization operation.

The SetPropertyValues method should be implemented with security in mind:

  • Only fully trusted code should be allowed to update application settings. Partially trusted code should be allowed to update only user application settings. Untrusted code is not typically allowed to update application settings.

  • Usage quotas should be considered to guard against resource attacks by partially trusted applications.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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