Console Methods

The Console type exposes the following members.

  Name Description
Public method Static member Beep() Plays the sound of a beep through the console speaker.
Public method Static member Beep(Int32, Int32) Plays the sound of a beep of a specified frequency and duration through the console speaker.
Public method Static member Clear Clears the console buffer and corresponding console window of display information.
Public method Static member MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32) Copies a specified source area of the screen buffer to a specified destination area.
Public method Static member MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32, Char, ConsoleColor, ConsoleColor) Copies a specified source area of the screen buffer to a specified destination area.
Public method Static member OpenStandardError() Acquires the standard error stream.
Public method Static member OpenStandardError(Int32) Acquires the standard error stream, which is set to a specified buffer size.
Public method Static member OpenStandardInput() Acquires the standard input stream.
Public method Static member OpenStandardInput(Int32) Acquires the standard input stream, which is set to a specified buffer size.
Public method Static member OpenStandardOutput() Acquires the standard output stream.
Public method Static member OpenStandardOutput(Int32) Acquires the standard output stream, which is set to a specified buffer size.
Public method Static member Read Reads the next character from the standard input stream.
Public method Static member ReadKey() Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window.
Public method Static member ReadKey(Boolean) Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window.
Public method Static member ReadLine Reads the next line of characters from the standard input stream.
Public method Static member ResetColor Sets the foreground and background console colors to their defaults.
Public method Static member SetBufferSize Sets the height and width of the screen buffer area to the specified values.
Public method Static member SetCursorPosition Sets the position of the cursor.
Public method Static member SetError Sets the Error property to the specified TextWriter object.
Public method Static member SetIn Sets the In property to the specified TextReader object.
Public method Static member SetOut Sets the Out property to the specified TextWriter object.
Public method Static member SetWindowPosition Sets the position of the console window relative to the screen buffer.
Public method Static member SetWindowSize Sets the height and width of the console window to the specified values.
Public method Static member Write(Boolean) Writes the text representation of the specified Boolean value to the standard output stream.
Public method Static member Write(Char) Writes the specified Unicode character value to the standard output stream.
Public method Static member Write(Char[]) Writes the specified array of Unicode characters to the standard output stream.
Public method Static member Write(Decimal) Writes the text representation of the specified Decimal value to the standard output stream.
Public method Static member Write(Double) Writes the text representation of the specified double-precision floating-point value to the standard output stream.
Public method Static member Write(Int32) Writes the text representation of the specified 32-bit signed integer value to the standard output stream.
Public method Static member Write(Int64) Writes the text representation of the specified 64-bit signed integer value to the standard output stream.
Public method Static member Write(Object) Writes the text representation of the specified object to the standard output stream.
Public method Static member Write(Single) Writes the text representation of the specified single-precision floating-point value to the standard output stream.
Public method Static member Write(String) Writes the specified string value to the standard output stream.
Public method Static member Write(UInt32) Writes the text representation of the specified 32-bit unsigned integer value to the standard output stream.
Public method Static member Write(UInt64) Writes the text representation of the specified 64-bit unsigned integer value to the standard output stream.
Public method Static member Write(String, Object) Writes the text representation of the specified object to the standard output stream using the specified format information.
Public method Static member Write(String, Object[]) Writes the text representation of the specified array of objects to the standard output stream using the specified format information.
Public method Static member Write(Char[], Int32, Int32) Writes the specified subarray of Unicode characters to the standard output stream.
Public method Static member Write(String, Object, Object) Writes the text representation of the specified objects to the standard output stream using the specified format information.
Public method Static member Write(String, Object, Object, Object) Writes the text representation of the specified objects to the standard output stream using the specified format information.
Public method Static member Write(String, Object, Object, Object, Object) Writes the text representation of the specified objects and variable-length parameter list to the standard output stream using the specified format information.
Public method Static member WriteLine() Writes the current line terminator to the standard output stream.
Public method Static member WriteLine(Boolean) Writes the text representation of the specified Boolean value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(Char) Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream.
Public method Static member WriteLine(Char[]) Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(Decimal) Writes the text representation of the specified Decimal value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(Double) Writes the text representation of the specified double-precision floating-point value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(Int32) Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(Int64) Writes the text representation of the specified 64-bit signed integer value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(Object) Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(Single) Writes the text representation of the specified single-precision floating-point value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(String) Writes the specified string value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(UInt32) Writes the text representation of the specified 32-bit unsigned integer value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(UInt64) Writes the text representation of the specified 64-bit unsigned integer value, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(String, Object) Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream using the specified format information.
Public method Static member WriteLine(String, Object[]) 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.
Public method Static member WriteLine(Char[], Int32, Int32) Writes the specified subarray of Unicode characters, followed by the current line terminator, to the standard output stream.
Public method Static member WriteLine(String, Object, Object) Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.
Public method Static member WriteLine(String, Object, Object, Object) Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.
Public method Static member WriteLine(String, Object, Object, Object, Object) Writes the text representation of the specified objects and variable-length parameter list, followed by the current line terminator, to the standard output stream using the specified format information.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft