Android Guides | Samples

Java.Lang.Short.ParseShort Method

Parses the specified string as a signed short value using the specified radix.

Syntax

[Android.Runtime.Register("parseShort", "(Ljava/lang/String;I)S", "")]
public static Int16 ParseShort (String string, Int32 radix)

Parameters

string
the string representation of a short value.
radix
the radix to use when parsing.

Exceptions

TypeReason
NumberFormatExceptionif string cannot be parsed as a short value, or radix Character.MAX_RADIX.

Remarks

Parses the specified string as a signed short value using the specified radix. The ASCII character - ('-') is recognized as the minus sign.

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1