Application.SavePropertiesAsync Method

Definition

Caution

Properties API is obsolete, use Microsoft.Maui.Storage.Preferences instead.

Asynchronously persists the Properties dictionary for the application object.

public:
 System::Threading::Tasks::Task ^ SavePropertiesAsync();
public System.Threading.Tasks.Task SavePropertiesAsync ();
[System.Obsolete("Properties API is obsolete, use Microsoft.Maui.Storage.Preferences instead.", true)]
public System.Threading.Tasks.Task SavePropertiesAsync ();
member this.SavePropertiesAsync : unit -> System.Threading.Tasks.Task
[<System.Obsolete("Properties API is obsolete, use Microsoft.Maui.Storage.Preferences instead.", true)>]
member this.SavePropertiesAsync : unit -> System.Threading.Tasks.Task
Public Function SavePropertiesAsync () As Task

Returns

A task that represents the asynchronous save operation.

Attributes

Remarks

The developer uses this method to persist the application state that is currently stored in Properties immediately, rather than waiting for a life cycle event to trigger the data to be saved to the device's permanent storage.

Applies to