IPreferenceDataStore.GetString(String, String) Method
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.
Retrieve a String value from the data store.
[Android.Runtime.Register("getString", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Ljava_lang_String_Handler:Android.Preferences.IPreferenceDataStore, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual string? GetString (string? key, string? defValue);
[<Android.Runtime.Register("getString", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Ljava_lang_String_Handler:Android.Preferences.IPreferenceDataStore, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member GetString : string * string -> string
override this.GetString : string * string -> string
Parameters
- key
- String
The name of the preference to retrieve.
- defValue
- String
Value to return if this preference does not exist.
Returns
- Attributes
Remarks
Retrieve a String value from the data store.
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.