ISharedPreferences.Contains(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.
Checks whether the preferences contains a preference.
[Android.Runtime.Register("contains", "(Ljava/lang/String;)Z", "GetContains_Ljava_lang_String_Handler:Android.Content.ISharedPreferencesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool Contains (string? key);
[<Android.Runtime.Register("contains", "(Ljava/lang/String;)Z", "GetContains_Ljava_lang_String_Handler:Android.Content.ISharedPreferencesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Contains : string -> bool
Parameters
- key
- String
The name of the preference to check.
Returns
Returns true if the preference exists in the preferences, otherwise false.
- Attributes
Remarks
Checks whether the preferences contains a preference.
Java documentation for android.content.SharedPreferences.contains(java.lang.String)
.
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.