Sdílet prostřednictvím


BaseBundle.GetInt Method

Definition

Overloads

GetInt(String)

Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.

GetInt(String, Int32)

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

GetInt(String)

Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.

[Android.Runtime.Register("getInt", "(Ljava/lang/String;)I", "GetGetInt_Ljava_lang_String_Handler")]
public virtual int GetInt (string? key);
[<Android.Runtime.Register("getInt", "(Ljava/lang/String;)I", "GetGetInt_Ljava_lang_String_Handler")>]
abstract member GetInt : string -> int
override this.GetInt : string -> int

Parameters

key
String

a String

Returns

an int value

Attributes

Remarks

Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.

Java documentation for android.os.BaseBundle.getInt(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.

Applies to

GetInt(String, Int32)

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

[Android.Runtime.Register("getInt", "(Ljava/lang/String;I)I", "GetGetInt_Ljava_lang_String_IHandler")]
public virtual int GetInt (string? key, int defaultValue);
[<Android.Runtime.Register("getInt", "(Ljava/lang/String;I)I", "GetGetInt_Ljava_lang_String_IHandler")>]
abstract member GetInt : string * int -> int
override this.GetInt : string * int -> int

Parameters

key
String

a String

defaultValue
Int32

Value to return if key does not exist

Returns

an int value

Attributes

Remarks

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Java documentation for android.os.BaseBundle.getInt(java.lang.String, int).

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