Skip to content
CShift0.32

Console

Struct · built-in type

struct Console

Text output to the console: stdout and stderr.

Console.WriteLine("Hello");
Console.Write(42); // numbers, bool, char, enums and slices become text
Console.WriteErrorLine("warning: ...");

The argument can be anything that becomes text in "x" + value: strings, string slices, numbers, bool, char, enums, and structs with a string ToString().

Name Description
Write Writes value to stdout.
WriteLine Writes value and a line break (\n) to stdout.
WriteError Writes value to stderr.
WriteErrorLine Writes value and a line break to stderr.
static void Write(string value)

Writes value to stdout.

static void WriteLine(string value)

Writes value and a line break (\n) to stdout.

static void WriteLine()

Writes a line break to stdout.

static void WriteError(string value)

Writes value to stderr.

static void WriteErrorLine(string value)

Writes value and a line break to stderr.

static void WriteErrorLine()

Writes a line break to stderr.