Freigeben über


IPreferenceDataStore.GetLong(String, Int64) Method

Definition

Retrieve a long value from the data store.

[Android.Runtime.Register("getLong", "(Ljava/lang/String;J)J", "GetGetLong_Ljava_lang_String_JHandler:Android.Preferences.IPreferenceDataStore, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual long GetLong (string? key, long defValue);
[<Android.Runtime.Register("getLong", "(Ljava/lang/String;J)J", "GetGetLong_Ljava_lang_String_JHandler:Android.Preferences.IPreferenceDataStore, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member GetLong : string * int64 -> int64
override this.GetLong : string * int64 -> int64

Parameters

key
String

The name of the preference to retrieve.

defValue
Int64

Value to return if this preference does not exist.

Returns

Attributes

Remarks

Retrieve a long value from the data store.

Java documentation for android.preference.PreferenceDataStore.getLong(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