ApplicationSettingsBase.GetPreviousVersion Method (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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


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

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