Java.Util.Scanner.Next Method
Returns the next token if it matches the specified pattern.

Syntax

[Android.Runtime.Register("next", "(Ljava/lang/String;)Ljava/lang/String;", "")]
public string Next (string pattern)

Parameters

pattern
the string specifying the pattern to scan for.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalStateExceptionif this Scanner has been closed.
Java.Util.NoSuchElementExceptionif input has been exhausted.
Java.Util.InputMismatchExceptionif the next token does not match the pattern given.

Remarks

Returns the next token if it matches the specified pattern. The token will be both prefixed and suffixed by the delimiter that is currently being used (or a string that matches the delimiter pattern). This method will block if input is being read. Calling this method is equivalent to next(Pattern.compile(pattern)).

[Android Documentation]

Requirements

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