static void write(...);
- Writes the text representation of the specified value or values to the standard output stream.
static void writeln(...);
- Writes the text representation of the specified value or values, followed by the current line terminator, to the standard output stream.
static Writer output();
- Gets the standard output stream.
static void setOutput(Writer newOutput);
- Sets the output property to the specified Writer object.
Parameters
Writer newOutput
The new standard output.
static void outputEncoding(Encoding value);
static Encoding outputEncoding();
- Gets or sets the encoding the console uses to write output.
Parameters
Encoding value
The encoding used to write console output.
static Writer error();
- Gets the standard error output stream.
static void setError(Writer newError);
- Sets the error property to the specified Writer object.
Parameters
Writer newError
The new standard error output.
static void clear();
- Clears the console buffer and corresponding console window of display information.
static void beep(int frequency = 800, int duration = 200);
- Plays the sound of a beep of a specified frequency and duration through the console speaker.
Parameters
int frequency
The frequency of the beep, ranging from 37 to 32767 hertz.
int duration
The duration of the beep measured in milliseconds.
static void title(char[] value);
static char[] title();
- Gets or sets the title to display in the console title bar.
Parameters
char[] value
The text to be displayed in the title bar of the console.
static void backgroundColor(ConsoleColor value);
static ConsoleColor backgroundColor();
- Gets or sets the background color of the console.
Parameters
ConsoleColor value
The color that appears behind each character.
static void foregroundColor(ConsoleColor value);
static ConsoleColor foregroundColor();
- Gets or sets the foreground color of the console.
Parameters
ConsoleColor value
The color of each character that is displayed.
static void resetColor();
- Sets the foreground and background console colors to their defaults.
static void setCursorPosition(int left, int top);
- Sets the position of the cursor.
Parameters
int left
The column position.
int top
The row position.
static void cursorLeft(int value);
static int cursorLeft();
- Gets or sets the column position of the cursor.
static void cursorTop(int value);
static int cursorTop();
- Gets or sets the row position of the cursor.
static void windowLeft(int value);
static int windowLeft();
- Gets or sets the left position of the console window area relative to the screen buffer.
Parameters
int value
The left console window position measured in columns.
static void windowTop(int value);
static int windowTop();
- Gets or sets the top position of the console window area relative to the screen buffer.
Parameters
int value
The top console window position measured in rows.
static void setWindowPosition(int left, int top);
- Sets the position of the console window relative to the screen buffer.
Parameters
int left
The column position of the upper-left corner.
int top
The row position of the upper-left corner.
static void setWindowSize(int width, int height);
- Sets the size of the console window.
Parameters
int width
The width of the console window measured in columns.
int height
The height of the console window measured in rows.
static void windowWidth(int value);
static int windowWidth();
- Gets or sets the width of the console window.
Parameters
int value
The width of the console window measured in columns.
static void windowHeight(int value);
static int windowHeight();
- Gets or sets the height of the console window.
Parameters
int value
The height of the console window measured in rows.