SettingsProvider.SetPropertyValues Method

Definition

Sets the values of the specified group of property settings.

public:
 abstract void SetPropertyValues(System::Configuration::SettingsContext ^ context, System::Configuration::SettingsPropertyValueCollection ^ collection);
public abstract void SetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyValueCollection collection);
abstract member SetPropertyValues : System.Configuration.SettingsContext * System.Configuration.SettingsPropertyValueCollection -> unit
Public MustOverride Sub SetPropertyValues (context As SettingsContext, collection As SettingsPropertyValueCollection)

Parameters

context
SettingsContext

A SettingsContext describing the current application usage.

collection
SettingsPropertyValueCollection

A SettingsPropertyValueCollection representing the group of property settings to set.

Remarks

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.

Applies to

See also