ApplicationSettingsBase.GetPreviousVersion Method (String)

 

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

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

public object GetPreviousVersion(
	string propertyName
)

Parameters

propertyName
Type: System.String

A String containing the name of the settings property whose value is to be returned.

Return Value

Type: System.Object

An Object containing the value of the specified SettingsProperty if found; otherwise, null.

Exception Condition
SettingsPropertyNotFoundException

The property does not exist. The property count is zero or the property cannot be found in the data store.

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.

.NET Framework
Available since 2.0
Return to top
Show: