Preferences.Get(String, String) Preferences.Get(String, String) Method

Definition

Gets the String value mapped to the given key or its default value if no value is mapped or no backing store is available.

[Android.Runtime.Register("get", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGet_Ljava_lang_String_Ljava_lang_String_Handler")]
public abstract string Get (string key, string def);
abstract member Get : string * string -> string

Parameters

key
String String

the preference key.

Returns

Exceptions

if this node has been removed.

if the parameter key is null.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to