Java.Text.ChoiceFormat.Parse Method
Parses a double from the specified string starting at the index specified by position.

Syntax

[Android.Runtime.Register("parse", "(Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/lang/Number;", "GetParse_Ljava_lang_String_Ljava_text_ParsePosition_Handler")]
public override Java.Lang.Number Parse (string string, ParsePosition position)

Parameters

string
the source string to parse.
position
input/output parameter, specifies the start index in string from where to start parsing. See the Returns section for a description of the output values.

Returns

Documentation for this section has not yet been entered.

Remarks

Parses a double from the specified string starting at the index specified by position. The string is compared to the strings of this ChoiceFormat and if a match occurs then the lower bound of the corresponding range in the limits array is returned. If the string is successfully parsed then the index of the ParsePosition passed to this method is updated to the index following the parsed text.

If one of the format strings of this ChoiceFormat instance is found in string starting at position.getIndex() then

  • the index in position is set to the index following the parsed text;
  • the Java.Lang.Double corresponding to the format string is returned.

If none of the format strings is found in string then

  • the error index in position is set to the current index in position;
  • Java.Lang.Double.NaN is returned.

[Android Documentation]

Requirements

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