System.Configuration.SettingsProvider.SetPropertyValues Method

Sets the values of the specified group of property settings.

Syntax

public abstract void SetPropertyValues (SettingsContext context, SettingsPropertyValueCollection collection)

Parameters

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

Remarks

System.Configuration.ApplicationSettingsBase contains the ApplicationSettingsBase.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 SettingsProvider.SetPropertyValues(SettingsContext, SettingsPropertyValueCollection) method for each System.Configuration.SettingsProvider to perform the actual serialization operation.

The SettingsProvider.SetPropertyValues(SettingsContext, SettingsPropertyValueCollection) 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.

Requirements

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