Sdílet prostřednictvím


JSONObject.GetInt(String) Method

Definition

Returns the value mapped by name if it exists and is an int or can be coerced to an int, or throws otherwise.

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

Parameters

name
String

Returns

Attributes

Exceptions

if the mapping doesn't exist or cannot be coerced to an int.

Remarks

Returns the value mapped by name if it exists and is an int or can be coerced to an int, or throws otherwise.

Java documentation for org.json.JSONObject.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