Preferences.PutLong(String, Int64) Method

Definition

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

[Android.Runtime.Register("putLong", "(Ljava/lang/String;J)V", "GetPutLong_Ljava_lang_String_JHandler")]
public abstract void PutLong (string? key, long value);
[<Android.Runtime.Register("putLong", "(Ljava/lang/String;J)V", "GetPutLong_Ljava_lang_String_JHandler")>]
abstract member PutLong : string * int64 -> unit

Parameters

key
String

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

value
Int64

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 long value with the specified key in this preference node. The associated string is the one that would be returned if the long value were passed to Long#toString(long). This method is intended for use in conjunction with #getLong.

Java documentation for java.util.prefs.Preferences.putLong(java.lang.String, long).

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