System.Configuration.IApplicationSettingsProvider.GetPreviousVersion Method

Returns the value of the specified settings property for the previous version of the same application.

Syntax

public SettingsPropertyValue GetPreviousVersion (SettingsContext context, SettingsProperty property)

Parameters

context
A System.Configuration.SettingsContext describing the current application usage.
property
The System.Configuration.SettingsProperty whose value is to be returned.

Returns

A System.Configuration.SettingsPropertyValue containing the value of the specified property setting as it was last set in the previous version of the application; or null if the setting cannot be found.

Remarks

You can use the IApplicationSettingsProvider.GetPreviousVersion(SettingsContext, SettingsProperty) method in conjunction with the IApplicationSettingsProvider.Upgrade(SettingsContext, SettingsPropertyCollection) method to migrate application settings during or after the installation of a new version of an application.

Requirements

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