共用方式為


Bundle.GetShort Method

Definition

Overloads

GetShort(String, Int16)

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

GetShort(String)

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

GetShort(String, Int16)

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("getShort", "(Ljava/lang/String;S)S", "")]
public short GetShort (string? key, short defaultValue);
[<Android.Runtime.Register("getShort", "(Ljava/lang/String;S)S", "")>]
member this.GetShort : string * int16 -> int16

Parameters

key
String

a String

defaultValue
Int16

Value to return if key does not exist

Returns

a short 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.Bundle.getShort(java.lang.String, short).

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

GetShort(String)

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

[Android.Runtime.Register("getShort", "(Ljava/lang/String;)S", "")]
public short GetShort (string? key);
[<Android.Runtime.Register("getShort", "(Ljava/lang/String;)S", "")>]
member this.GetShort : string -> int16

Parameters

key
String

a String

Returns

a short value

Attributes

Remarks

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

Java documentation for android.os.Bundle.getShort(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