IPreferences Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |