GetPreviousVersion Method
Collapse the table of content
Expand the table of content

LocalFileSettingsProvider.GetPreviousVersion Method (SettingsContext, SettingsProperty)


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

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

[FileIOPermissionAttribute(SecurityAction.Assert, AllFiles = FileIOPermissionAccess.NoAccess | FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery)]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public SettingsPropertyValue GetPreviousVersion(
	SettingsContext context,
	SettingsProperty property


Type: System.Configuration.SettingsContext

A SettingsContext that describes where the application settings property is used.

Type: System.Configuration.SettingsProperty

The SettingsProperty whose value is to be returned.

Return Value

Type: System.Configuration.SettingsPropertyValue

A SettingsPropertyValue representing the application setting if found; otherwise, null.

The GetPreviousVersion method is often used in conjunction with the Upgrade method when migrating application settings during the installation of a new version of an application. For more information, see the Upgrade method.

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft