Editar

Partilhar via


ApplicationSettingsBase.GetPreviousVersion(String) Method

Definition

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

public:
 System::Object ^ GetPreviousVersion(System::String ^ propertyName);
public object GetPreviousVersion (string propertyName);
member this.GetPreviousVersion : string -> obj
Public Function GetPreviousVersion (propertyName As String) As Object

Parameters

propertyName
String

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

Returns

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

Exceptions

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

Remarks

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.

Applies to

See also