ApplicationData.SetVersionAsync(UInt32, ApplicationDataSetVersionHandler) ApplicationData.SetVersionAsync(UInt32, ApplicationDataSetVersionHandler) ApplicationData.SetVersionAsync(UInt32, ApplicationDataSetVersionHandler) ApplicationData.SetVersionAsync(UInt32, ApplicationDataSetVersionHandler) ApplicationData.SetVersionAsync(UInt32, ApplicationDataSetVersionHandler) Method

Definition

Sets the version number of the application data in the app data store.

public : IAsyncAction SetVersionAsync(unsigned int desiredVersion, ApplicationDataSetVersionHandler handler)
IAsyncAction SetVersionAsync(uint32_t desiredVersion, ApplicationDataSetVersionHandler handler) const;
public IAsyncAction SetVersionAsync(UInt32 desiredVersion, ApplicationDataSetVersionHandler handler)
Public Function SetVersionAsync(desiredVersion As UInt32, handler As ApplicationDataSetVersionHandler) As IAsyncAction
Windows.Storage.ApplicationData.setVersionAsync(desiredVersion, handler).done( /* Your success and error handlers */ );

Parameters

desiredVersion
UInt32 UInt32 UInt32

The new version number.

Returns

An object that is used to manage the asynchronous set version operation.

Remarks

Versioning enables you to change the application data format used in a future release of your app without causing compatibility problems with previous releases of your app. The app checks the version of the data in the data store, and if it is less than the version the app expects, the app should update the application data to the new format and update the version.

It is strongly recommended that you use sequential and incrementing version numbers, starting at 1.