Methods
- Beep() static Plays the sound of a beep through the console speaker.
-
Beep(Int32,
Int32) static Plays the sound of a beep of a specified frequency and duration through the console speaker. - Clear() static Clears the console buffer and corresponding console window of display information.
-
Move
Buffer static Copies a specified source area of the screen buffer to a specified destination area.Area(Int32, Int32, Int32, Int32, Int32, Int32) -
Move
Buffer static Copies a specified source area of the screen buffer to a specified destination area.Area(Int32, Int32, Int32, Int32, Int32, Int32, Char, Console Color, Console Color) -
Open
Standard static Acquires the standard error stream.Error() -
Open
Standard static Acquires the standard error stream, which is set to a specified buffer size.Error(Int32) -
Open
Standard static Acquires the standard input stream.Input() -
Open
Standard static Acquires the standard input stream, which is set to a specified buffer size.Input(Int32) -
Open
Standard static Acquires the standard output stream.Output() -
Open
Standard static Acquires the standard output stream, which is set to a specified buffer size.Output(Int32) - Read() static Reads the next character from the standard input stream.
-
Read
Key() static Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window. -
Read
Key(Boolean) static Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window. -
Read
Line() static Reads the next line of characters from the standard input stream. -
Reset
Color() static Sets the foreground and background console colors to their defaults. -
Set
Buffer static Sets the height and width of the screen buffer area to the specified values.Size(Int32, Int32) -
Set
Cursor static Sets the position of the cursor.Position(Int32, Int32) -
Set
Error(Text static Sets the Error property to the specified TextWriter object.Writer) -
Set
In(Text static Sets the In property to the specified TextReader object.Reader) -
Set
Out(Text static Sets the Out property to target the TextWriter object.Writer) -
Set
Window static Sets the position of the console window relative to the screen buffer.Position(Int32, Int32) -
Set
Window static Sets the height and width of the console window to the specified values.Size(Int32, Int32) - Write(Boolean) static Writes the text representation of the specified Boolean value to the standard output stream.
- Write(Char) static Writes the specified Unicode character value to the standard output stream.
- Write(Char[]) static Writes the specified array of Unicode characters to the standard output stream.
-
Write(Char[],
Int32, static Writes the specified subarray of Unicode characters to the standard output stream.Int32) - Write(Decimal) static Writes the text representation of the specified Decimal value to the standard output stream.
- Write(Double) static Writes the text representation of the specified double-precision floating-point value to the standard output stream.
- Write(Int32) static Writes the text representation of the specified 32-bit signed integer value to the standard output stream.
- Write(Int64) static Writes the text representation of the specified 64-bit signed integer value to the standard output stream.
- Write(Object) static Writes the text representation of the specified object to the standard output stream.
- Write(Single) static Writes the text representation of the specified single-precision floating-point value to the standard output stream.
- Write(String) static Writes the specified string value to the standard output stream.
-
Write(String,
Object) static Writes the text representation of the specified object to the standard output stream using the specified format information. -
Write(String,
Object, static Writes the text representation of the specified objects to the standard output stream using the specified format information.Object) -
Write(String,
Object, static Writes the text representation of the specified objects to the standard output stream using the specified format information.Object, Object) -
Write(String,
Object[]) static Writes the text representation of the specified array of objects to the standard output stream using the specified format information. - Write(UInt32) static Writes the text representation of the specified 32-bit unsigned integer value to the standard output stream.
- Write(UInt64) static Writes the text representation of the specified 64-bit unsigned integer value to the standard output stream.
-
Write
Line() static Writes the current line terminator to the standard output stream. -
Write
Line(Boolean) static Writes the text representation of the specified Boolean value, followed by the current line terminator, to the standard output stream. -
Write
Line(Char) static Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream. -
Write
Line(Char[]) static Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream. -
Write
Line(Char[], static Writes the specified subarray of Unicode characters, followed by the current line terminator, to the standard output stream.Int32, Int32) -
Write
Line(Decimal) static Writes the text representation of the specified Decimal value, followed by the current line terminator, to the standard output stream. -
Write
Line(Double) static Writes the text representation of the specified double-precision floating-point value, followed by the current line terminator, to the standard output stream. -
Write
Line(Int32) static Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream. -
Write
Line(Int64) static Writes the text representation of the specified 64-bit signed integer value, followed by the current line terminator, to the standard output stream. -
Write
Line(Object) static Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream. -
Write
Line(Single) static Writes the text representation of the specified single-precision floating-point value, followed by the current line terminator, to the standard output stream. -
Write
Line(String) static Writes the specified string value, followed by the current line terminator, to the standard output stream. -
Write
Line(String, static Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream using the specified format information.Object) -
Write
Line(String, static Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.Object, Object) -
Write
Line(String, static Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.Object, Object, Object) -
Write
Line(String, static Writes the text representation of the specified array of objects, followed by the current line terminator, to the standard output stream using the specified format information.Object[]) -
Write
Line(UInt32) static Writes the text representation of the specified 32-bit unsigned integer value, followed by the current line terminator, to the standard output stream. -
Write
Line(UInt64) static Writes the text representation of the specified 64-bit unsigned integer value, followed by the current line terminator, to the standard output stream.
Properties
-
Background
Color static Gets or sets the background color of the console. -
Buffer
Height static Gets or sets the height of the buffer area. -
Buffer
Width static Gets or sets the width of the buffer area. -
Caps
Lock static Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off. -
Cursor
Left static Gets or sets the column position of the cursor within the buffer area. -
Cursor
Size static Gets or sets the height of the cursor within a character cell. -
Cursor
Top static Gets or sets the row position of the cursor within the buffer area. -
Cursor
Visible static Gets or sets a value indicating whether the cursor is visible. - Error static Gets the standard error output stream.
-
Foreground
Color static Gets or sets the foreground color of the console. - In static Gets the standard input stream.
-
Input
Encoding static Gets or sets the encoding the console uses to read input. -
Is
Error static Gets a value that indicates whether the error output stream has been redirected from the standard error stream.Redirected -
Is
Input static Gets a value that indicates whether input has been redirected from the standard input stream.Redirected -
Is
Output static Gets a value that indicates whether output has been redirected from the standard output stream.Redirected -
Key
Available static Gets a value indicating whether a key press is available in the input stream. -
Largest
Window static Gets the largest possible number of console window rows, based on the current font and screen resolution.Height -
Largest
Window static Gets the largest possible number of console window columns, based on the current font and screen resolution.Width -
Number
Lock static Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off. - Out static Gets the standard output stream.
-
Output
Encoding static Gets or sets the encoding the console uses to write output. - Title static Gets or sets the title to display in the console title bar.
-
Treat
Control static Gets or sets a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system.CAs Input -
Window
Height static Gets or sets the height of the console window area. -
Window
Left static Gets or sets the leftmost position of the console window area relative to the screen buffer. -
Window
Top static Gets or sets the top position of the console window area relative to the screen buffer. -
Window
Width static Gets or sets the width of the console window.
Events
-
Cancel
Key static Occurs when the Control modifier key (Ctrl) and either the C console key (C) or the Break key are pressed simultaneously (Ctrl+C or Ctrl+Break).Press