IPreferences Interface

Definition

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

public interface class IPreferences
public interface IPreferences
type IPreferences = interface
Public Interface IPreferences

Remarks

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

  • iOS: NSUserDefaults
  • Android: SharedPreferences
  • Windows: ApplicationDataContainer

Methods

Clear(String)

Clears all keys and values.

ContainsKey(String, String)

Checks for the existence of a given key.

Get<T>(String, T, 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.

Set<T>(String, T, String)

Sets a value for a given key.

Applies to