Language

Console.ReadLine Method

Definition

Overloads

Name Description
ReadLine(String, Object[])

Reads a single line of text from the console.

ReadLine()

Reads a single line of text from the console.

ReadLine(String, Object[])

Reads a single line of text from the console.

[Android.Runtime.Register("readLine", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "")]
public string? ReadLine(string? fmt, params Java.Lang.Object[]? args);
[<Android.Runtime.Register("readLine", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "")>]
member this.ReadLine : string * Java.Lang.Object[] -> string

Parameters

fmt
String

A format string as described in Format string syntax.

args
Object[]

Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java Virtual Machine Specification.

Returns

A string containing the line read from the console, not including any line-termination characters, or null if an end of stream has been reached.

Attributes

Remarks

Java documentation for java.io.Console.readLine().

Java reference for java.io.Console.readLine.

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

ReadLine()

Reads a single line of text from the console.

[Android.Runtime.Register("readLine", "()Ljava/lang/String;", "")]
public string? ReadLine();
[<Android.Runtime.Register("readLine", "()Ljava/lang/String;", "")>]
member this.ReadLine : unit -> string

Returns

A string containing the line read from the console, not including any line-termination characters, or null if an end of stream has been reached.

Attributes

Remarks

Reads a single line of text from the console.

Java documentation for java.io.Console.readLine().

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