ApplicationSettingsBase.GetPreviousVersion Method

Note: This method is new in the .NET Framework version 2.0.

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
)
public Object GetPreviousVersion (
	String propertyName
)
public function GetPreviousVersion (
	propertyName : String
) : Object

Parameters

propertyName

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

Return Value

An Object containing the value of the specified SettingsProperty if found; otherwise, a null reference (Nothing in Visual Basic).

Exception typeCondition

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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: