Console.ReadLineAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ReadLineAsync() |
Reads a console text line in a task. |
| ReadLineAsync(String, Object[]) |
Displays a formatted prompt and reads a console line in a task. |
ReadLineAsync()
Reads a console text line in a task.
public System.Threading.Tasks.Task<string?> ReadLineAsync();
member this.ReadLineAsync : unit -> System.Threading.Tasks.Task<string>
Returns
A task whose result is the line without its terminator, or null if input ends before any characters are read.
Remarks
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
ReadLineAsync(String, Object[])
Displays a formatted prompt and reads a console line in a task.
public System.Threading.Tasks.Task<string?> ReadLineAsync(string? fmt, params Java.Lang.Object[]? args);
member this.ReadLineAsync : string * Java.Lang.Object[] -> System.Threading.Tasks.Task<string>
Parameters
- fmt
- String
The Java format string used for the prompt.
- args
- Object[]
The values supplied to the prompt's format string.
Returns
A task whose result is the line without its terminator, or null if input ends before any characters are read.
Remarks
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.