Preferences.PutBoolean(String, Boolean) Method

Definition

Associates a string representing the specified boolean value with the specified key in this preference node.

[Android.Runtime.Register("putBoolean", "(Ljava/lang/String;Z)V", "GetPutBoolean_Ljava_lang_String_ZHandler")]
public abstract void PutBoolean (string? key, bool value);
[<Android.Runtime.Register("putBoolean", "(Ljava/lang/String;Z)V", "GetPutBoolean_Ljava_lang_String_ZHandler")>]
abstract member PutBoolean : string * bool -> unit

Parameters

key
String

key with which the string form of value is to be associated.

value
Boolean

value whose string form is to be associated with key.

Attributes

Exceptions

if the given key is null.

if the given key's length is bigger than MAX_KEY_LENGTH.

if this node has been removed.

Remarks

Associates a string representing the specified boolean value with the specified key in this preference node. The associated string is "true" if the value is true, and "false" if it is false. This method is intended for use in conjunction with #getBoolean.

Java documentation for java.util.prefs.Preferences.putBoolean(java.lang.String, boolean).

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