Static class
Console
static class Console
Module: System
Assembly: System.Runtime.dll
Source file: Console.rvn
Static access to standard input, output and error.
Remarks
Development API. UTF-8 and synchronous host calls. In is a shared invocation-owned text reader. Out/Error create fresh wrappers. Closing In closes that shared reader without closing process stdin. See the Console guide for ownership, limits and embedding behavior.
Properties
3 items
Static member:
Error: SyncTextWriter
Gets a fresh TextWriter wrapper for standard error.
Static member:
In: SyncTextReader
Gets the shared invocation-owned UTF-8 TextReader for standard input.
Static member:
Out: SyncTextWriter
Gets a fresh TextWriter wrapper for standard output.
Methods
37 items
Static member:
OpenKeyInput() -> Result<ConsoleKeyReader, ConsoleKeyError>
Acquires key input while preserving terminal signal handling.
Static member:
OpenKeyInput(captureInterrupts: bool) -> Result<ConsoleKeyReader, ConsoleKeyError>
Acquires synchronous, non-echoing terminal key input before text input starts.
Static member:
OpenStandardError() -> SyncOutputStream
Opens a non-owning byte-stream wrapper for standard error.
Static member:
OpenStandardInput() -> SyncInputStream
Opens a non-owning byte-stream wrapper for standard input.
Static member:
OpenStandardOutput() -> SyncOutputStream
Opens a non-owning byte-stream wrapper for standard output.
Static member:
PeekChar() -> Result<Optional<Character>, TextReadError>
Peeks at the next UTF-8 grapheme without advancing Console.In.
Static member:
Read(count: int, maxUtf8Bytes: int) -> Result<string, TextReadError>
Reads a requested grapheme count with a separate UTF-8 byte bound.
Static member:
Read(count: int) -> Result<string, TextReadError>
Reads a requested grapheme count, or the shorter remainder at EOF.
Static member:
ReadByte() -> Result<Optional<byte>, ConsoleReadError>
Reads one raw input byte.
Static member:
ReadChar() -> Result<Optional<Character>, TextReadError>
Reads one UTF-8 grapheme from the shared Console.In cursor.
Static member:
ReadLine() -> Result<Optional<string>, TextReadError>
Returns a Task; await completion. Reads one bounded strict UTF-8 line.
Static member:
ReadLine(maxUtf8Bytes: int) -> Result<Optional<string>, TextReadError>
Returns a Task; await completion. Reads one bounded strict UTF-8 line.
Static member:
Write(format: string, arg0: object?, arg1: object?, arg2: object?) -> ()
Writes composite text.
Static member:
Write(format: string, arg0: object?, arg1: object?) -> ()
Writes composite text.
Static member:
Write(format: string, arg0: object?) -> ()
Writes composite text.
Static member:
Write(format: string, arguments: ...object?[]) -> ()
Writes composite text.
Static member:
Write(value0: int) -> ()
Returns a Task; await completion. Writes a decimal integer without a line ending to stdout.
Static member:
Write(value0: string) -> ()
Returns a Task; await completion. Writes text without a line ending to stdout.
Static member:
WriteLine() -> ()
Writes an empty line to stdout and flushes it.
Static member:
WriteLine(format: string, arg0: object?, arg1: object?, arg2: object?) -> ()
Writes composite text followed by a newline.
Static member:
WriteLine(format: string, arg0: object?, arg1: object?) -> ()
Writes composite text followed by a newline.
Static member:
WriteLine(format: string, arg0: object?) -> ()
Writes composite text followed by a newline.
Static member:
WriteLine(format: string, arguments: ...object?[]) -> ()
Writes composite text followed by a newline.
Static member:
WriteLine(value: bool) -> ()
Writes True or False followed by LF without boxing.
Static member:
WriteLine(value: byte) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: Character) -> ()
No summary available.
Static member:
WriteLine(value: IntPtr) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: long) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: object?) -> ()
Writes the virtual ToString representation followed by LF, or an empty line for null.
Static member:
WriteLine(value: sbyte) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: short) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: uint) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: UIntPtr) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: ulong) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value: ushort) -> ()
Writes the invariant decimal integer followed by LF without boxing.
Static member:
WriteLine(value0: int) -> ()
Writes a decimal integer followed by LF to stdout.
Static member:
WriteLine(value0: string) -> ()
Writes text followed by LF to stdout.