Share via


Preferences Class

Definition

The Preferences API helps to store application preferences in a key/value store.

public ref class Preferences abstract sealed
public static class Preferences
type Preferences = class
Public Class Preferences
Inheritance
Preferences

Remarks

Each platform uses the platform provided native APIs for storing application/user preferences:

Properties

Default

Provides the default implementation for static usage of this API.

Methods

Clear()

Clears all keys and values.

Clear(String)

Clears all keys and values.

ContainsKey(String, String)

Checks the existence of a given key.

ContainsKey(String)

Checks the existence of a given key.

Get(String, Boolean, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Boolean)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, DateTime, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, DateTime)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, DateTimeOffset, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, DateTimeOffset)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Double, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Double)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Int32, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Int32)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Int64, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Int64)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Single, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, Single)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, String, String)

Gets the value for a given key, or the default specified if the key does not exist.

Get(String, String)

Gets the value for a given key, or the default specified if the key does not exist.

Remove(String, String)

Removes a key and its associated value if it exists.

Remove(String)

Removes a key and its associated value if it exists.

Set(String, Boolean, String)

Sets a value for a given key.

Set(String, Boolean)

Sets a value for a given key.

Set(String, DateTime, String)

Sets a value for a given key.

Set(String, DateTime)

Sets a value for a given key.

Set(String, DateTimeOffset, String)

Sets a value for a given key.

Set(String, DateTimeOffset)

Sets a value for a given key.

Set(String, Double, String)

Sets a value for a given key.

Set(String, Double)

Sets a value for a given key.

Set(String, Int32, String)

Sets a value for a given key.

Set(String, Int32)

Sets a value for a given key.

Set(String, Int64, String)

Sets a value for a given key.

Set(String, Int64)

Sets a value for a given key.

Set(String, Single, String)

Sets a value for a given key.

Set(String, Single)

Sets a value for a given key.

Set(String, String, String)

Sets a value for a given key.

Set(String, String)

Sets a value for a given key.

Applies to