Export (0) Print
Expand All
7 out of 14 rated this helpful - Rate this topic

Console Members

Represents the standard input, output, and error streams for console applications. This class cannot be inherited.

The following tables list the members exposed by the Console type.

  Name Description
Public property Static BackgroundColor Gets or sets the background color of the console.
Public property Static BufferHeight Gets or sets the height of the buffer area.
Public property Static BufferWidth Gets or sets the width of the buffer area.
Public property Static CapsLock Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off.
Public property Static CursorLeft Gets or sets the column position of the cursor within the buffer area.
Public property Static CursorSize Gets or sets the height of the cursor within a character cell.
Public property Static CursorTop Gets or sets the row position of the cursor within the buffer area.
Public property Static CursorVisible Gets or sets a value indicating whether the cursor is visible.
Public property Static Supported by the .NET Compact Framework Error Gets the standard error output stream.
Public property Static ForegroundColor Gets or sets the foreground color of the console.
Public property Static Supported by the .NET Compact Framework In Gets the standard input stream.
Public property Static InputEncoding Gets or sets the encoding the console uses to read input.
Public property Static KeyAvailable Gets a value indicating whether a key press is available in the input stream.
Public property Static LargestWindowHeight Gets the largest possible number of console window rows, based on the current font and screen resolution.
Public property Static LargestWindowWidth Gets the largest possible number of console window columns, based on the current font and screen resolution.
Public property Static NumberLock Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off.
Public property Static Supported by the .NET Compact Framework Out Gets the standard output stream.
Public property Static OutputEncoding Gets or sets the encoding the console uses to write output.
Public property Static Title Gets or sets the title to display in the console title bar.
Public property Static TreatControlCAsInput 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.
Public property Static WindowHeight Gets or sets the height of the console window area.
Public property Static WindowLeft Gets or sets the leftmost position of the console window area relative to the screen buffer.
Public property Static WindowTop Gets or sets the top position of the console window area relative to the screen buffer.
Public property Static WindowWidth Gets or sets the width of the console window.
Top
  Name Description
Public method Static Beep Overloaded. Plays the sound of a beep through the console speaker.
Public method Static Clear Clears the console buffer and corresponding console window of display information.
Public method Supported by the .NET Compact Framework Equals  Overloaded. Determines whether two Object instances are equal. (Inherited from Object.)
Public method Supported by the .NET Compact Framework GetHashCode  Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.)
Public method Supported by the .NET Compact Framework GetType  Gets the Type of the current instance. (Inherited from Object.)
Public method Static MoveBufferArea Overloaded. Copies a specified source area of the screen buffer to a specified destination area.
Public method Static OpenStandardError Overloaded. Acquires the standard error stream.
Public method Static OpenStandardInput Overloaded. Acquires the standard input stream.
Public method Static OpenStandardOutput Overloaded. Acquires the standard output stream.
Public method Static Read Reads the next character from the standard input stream.
Public method Static ReadKey Overloaded. Obtains the next character or function key pressed by the user.
Public method Static Supported by the .NET Compact Framework ReadLine Reads the next line of characters from the standard input stream.
Public method Static Supported by the .NET Compact Framework ReferenceEquals  Determines whether the specified Object instances are the same instance. (Inherited from Object.)
Public method Static ResetColor Sets the foreground and background console colors to their defaults.
Public method Static SetBufferSize Sets the height and width of the screen buffer area to the specified values.
Public method Static SetCursorPosition Sets the position of the cursor.
Public method Static Supported by the .NET Compact Framework SetError Sets the Error property to the specified TextWriter object.
Public method Static Supported by the .NET Compact Framework SetIn Sets the In property to the specified TextReader object.
Public method Static Supported by the .NET Compact Framework SetOut Sets the Out property to the specified TextWriter object.
Public method Static SetWindowPosition Sets the position of the console window relative to the screen buffer.
Public method Static SetWindowSize Sets the height and width of the console window to the specified values.
Public method Supported by the .NET Compact Framework ToString  Returns a String that represents the current Object. (Inherited from Object.)
Public method Static Supported by the .NET Compact Framework Write Overloaded. Writes the text representation of the specified value or values to the standard output stream.
Public method Static Supported by the .NET Compact Framework WriteLine Overloaded. Writes the specified data, followed by the current line terminator, to the standard output stream.
Top
  Name Description
Public event Static CancelKeyPress Occurs when the Control modifier key (CTRL) and C console key (C) are pressed simultaneously (CTRL+C).
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.