mscorlib(4.0.0.0) API with additions
|
Represents the standard input, output, and error streams for console applications. This class cannot be inherited.To browse the .NET Framework source code for this type, see the Reference Source. More...
Static Public Member Functions | |
static void | Beep () |
Plays the sound of a beep through the console speaker. More... | |
static void | Beep (int frequency, int duration) |
Plays the sound of a beep of a specified frequency and duration through the console speaker. More... | |
static void | Clear () |
Clears the console buffer and corresponding console window of display information. More... | |
static void | ResetColor () |
Sets the foreground and background console colors to their defaults. More... | |
static void | MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop) |
Copies a specified source area of the screen buffer to a specified destination area. More... | |
static unsafe void | MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor) |
Copies a specified source area of the screen buffer to a specified destination area. More... | |
static void | SetBufferSize (int width, int height) |
Sets the height and width of the screen buffer area to the specified values. More... | |
static unsafe void | SetWindowSize (int width, int height) |
Sets the height and width of the console window to the specified values. More... | |
static unsafe void | SetWindowPosition (int left, int top) |
Sets the position of the console window relative to the screen buffer. More... | |
static void | SetCursorPosition (int left, int top) |
Sets the position of the cursor. More... | |
static ConsoleKeyInfo | ReadKey () |
Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window. More... | |
static ConsoleKeyInfo | ReadKey (bool intercept) |
Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window. More... | |
static Stream | OpenStandardError () |
Acquires the standard error stream. More... | |
static Stream | OpenStandardError (int bufferSize) |
Acquires the standard error stream, which is set to a specified buffer size. More... | |
static Stream | OpenStandardInput () |
Acquires the standard input stream. More... | |
static Stream | OpenStandardInput (int bufferSize) |
Acquires the standard input stream, which is set to a specified buffer size. More... | |
static Stream | OpenStandardOutput () |
Acquires the standard output stream. More... | |
static Stream | OpenStandardOutput (int bufferSize) |
Acquires the standard output stream, which is set to a specified buffer size. More... | |
static void | SetIn (TextReader newIn) |
Sets the P:System.Console.In property to the specified T:System.IO.TextReader object. More... | |
static void | SetOut (TextWriter newOut) |
Sets the P:System.Console.Out property to the specified T:System.IO.TextWriter object. More... | |
static void | SetError (TextWriter newError) |
Sets the P:System.Console.Error property to the specified T:System.IO.TextWriter object. More... | |
static int | Read () |
Reads the next character from the standard input stream. More... | |
static string | ReadLine () |
Reads the next line of characters from the standard input stream. More... | |
static void | WriteLine () |
Writes the current line terminator to the standard output stream. More... | |
static void | WriteLine (bool value) |
Writes the text representation of the specified Boolean value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (char value) |
Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream. More... | |
static void | WriteLine (char[] buffer) |
Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (char[] buffer, int index, int count) |
Writes the specified subarray of Unicode characters, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (decimal value) |
Writes the text representation of the specified T:System.Decimal value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (double value) |
Writes the text representation of the specified double-precision floating-point value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (float value) |
Writes the text representation of the specified single-precision floating-point value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (int value) |
Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (uint value) |
Writes the text representation of the specified 32-bit unsigned integer value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (long value) |
Writes the text representation of the specified 64-bit signed integer value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (ulong value) |
Writes the text representation of the specified 64-bit unsigned integer value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (object value) |
Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (string value) |
Writes the specified string value, followed by the current line terminator, to the standard output stream. More... | |
static void | WriteLine (string format, object arg0) |
Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream using the specified format information. More... | |
static void | WriteLine (string format, object arg0, object arg1) |
Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information. More... | |
static void | WriteLine (string format, object arg0, object arg1, object arg2) |
Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information. More... | |
static void | WriteLine (string format, object arg0, object arg1, object arg2, object arg3, __arglist) |
static void | WriteLine (string format, params object[] arg) |
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. More... | |
static void | Write (string format, object arg0) |
Writes the text representation of the specified object to the standard output stream using the specified format information. More... | |
static void | Write (string format, object arg0, object arg1) |
Writes the text representation of the specified objects to the standard output stream using the specified format information. More... | |
static void | Write (string format, object arg0, object arg1, object arg2) |
Writes the text representation of the specified objects to the standard output stream using the specified format information. More... | |
static void | Write (string format, object arg0, object arg1, object arg2, object arg3, __arglist) |
static void | Write (string format, params object[] arg) |
Writes the text representation of the specified array of objects to the standard output stream using the specified format information. More... | |
static void | Write (bool value) |
Writes the text representation of the specified Boolean value to the standard output stream. More... | |
static void | Write (char value) |
Writes the specified Unicode character value to the standard output stream. More... | |
static void | Write (char[] buffer) |
Writes the specified array of Unicode characters to the standard output stream. More... | |
static void | Write (char[] buffer, int index, int count) |
Writes the specified subarray of Unicode characters to the standard output stream. More... | |
static void | Write (double value) |
Writes the text representation of the specified double-precision floating-point value to the standard output stream. More... | |
static void | Write (decimal value) |
Writes the text representation of the specified T:System.Decimal value to the standard output stream. More... | |
static void | Write (float value) |
Writes the text representation of the specified single-precision floating-point value to the standard output stream. More... | |
static void | Write (int value) |
Writes the text representation of the specified 32-bit signed integer value to the standard output stream. More... | |
static void | Write (uint value) |
Writes the text representation of the specified 32-bit unsigned integer value to the standard output stream. More... | |
static void | Write (long value) |
Writes the text representation of the specified 64-bit signed integer value to the standard output stream. More... | |
static void | Write (ulong value) |
Writes the text representation of the specified 64-bit unsigned integer value to the standard output stream. More... | |
static void | Write (object value) |
Writes the text representation of the specified object to the standard output stream. More... | |
static void | Write (string value) |
Writes the specified string value to the standard output stream. More... | |
Properties | |
static bool | IsInputRedirected [get] |
Gets a value that indicates whether input has been redirected from the standard input stream. More... | |
static bool | IsOutputRedirected [get] |
Gets a value that indicates whether output has been redirected from the standard output stream. More... | |
static bool | IsErrorRedirected [get] |
Gets a value that indicates whether the error output stream has been redirected from the standard error stream. More... | |
static TextReader | In [get] |
Gets the standard input stream. More... | |
static TextWriter | Out [get] |
Gets the standard output stream. More... | |
static TextWriter | Error [get] |
Gets the standard error output stream. More... | |
static Encoding | InputEncoding [get, set] |
Gets or sets the encoding the console uses to read input. More... | |
static Encoding | OutputEncoding [get, set] |
Gets or sets the encoding the console uses to write output. More... | |
static ConsoleColor | BackgroundColor [get, set] |
Gets or sets the background color of the console. More... | |
static ConsoleColor | ForegroundColor [get, set] |
Gets or sets the foreground color of the console. More... | |
static int | BufferHeight [get, set] |
Gets or sets the height of the buffer area. More... | |
static int | BufferWidth [get, set] |
Gets or sets the width of the buffer area. More... | |
static int | WindowHeight [get, set] |
Gets or sets the height of the console window area. More... | |
static int | WindowWidth [get, set] |
Gets or sets the width of the console window. More... | |
static int | LargestWindowWidth [get] |
Gets the largest possible number of console window columns, based on the current font and screen resolution. More... | |
static int | LargestWindowHeight [get] |
Gets the largest possible number of console window rows, based on the current font and screen resolution. More... | |
static int | WindowLeft [get, set] |
Gets or sets the leftmost position of the console window area relative to the screen buffer. More... | |
static int | WindowTop [get, set] |
Gets or sets the top position of the console window area relative to the screen buffer. More... | |
static int | CursorLeft [get, set] |
Gets or sets the column position of the cursor within the buffer area. More... | |
static int | CursorTop [get, set] |
Gets or sets the row position of the cursor within the buffer area. More... | |
static int | CursorSize [get, set] |
Gets or sets the height of the cursor within a character cell. More... | |
static bool | CursorVisible [get, set] |
Gets or sets a value indicating whether the cursor is visible. More... | |
static string | Title [get, set] |
Gets or sets the title to display in the console title bar. More... | |
static bool | KeyAvailable [get] |
Gets a value indicating whether a key press is available in the input stream. More... | |
static bool | NumberLock [get] |
Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off. More... | |
static bool | CapsLock [get] |
Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off. More... | |
static bool? | TreatControlCAsInput [get, set] |
Gets or sets a value indicating whether the combination of the F:System.ConsoleModifiers.Control modifier key and F:System.ConsoleKey.C console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system. More... | |
static ConsoleCancelEventHandler | CancelKeyPress |
Occurs when the F:System.ConsoleModifiers.Control modifier key (Ctrl) and either the F:System.ConsoleKey.C console key (C) or the Break key are pressed simultaneously (Ctrl+C or Ctrl+Break). More... | |
Represents the standard input, output, and error streams for console applications. This class cannot be inherited.To browse the .NET Framework source code for this type, see the Reference Source.
Definition at line 15 of file Console.cs.
|
static |
Plays the sound of a beep through the console speaker.
T:System.Security.HostProtectionException | This method was executed on a server, such as SQL Server, that does not permit access to a user interface. |
Definition at line 1077 of file Console.cs.
|
static |
Plays the sound of a beep of a specified frequency and duration through the console speaker.
frequency | The frequency of the beep, ranging from 37 to 32767 hertz. |
duration | The duration of the beep measured in milliseconds. |
T:System.ArgumentOutOfRangeException | frequency is less than 37 or more than 32767 hertz.-or- duration is less than or equal to zero. |
T:System.Security.HostProtectionException | This method was executed on a server, such as SQL Server, that does not permit access to the console. |
Definition at line 1091 of file Console.cs.
|
static |
Clears the console buffer and corresponding console window of display information.
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1107 of file Console.cs.
|
static |
Copies a specified source area of the screen buffer to a specified destination area.
sourceLeft | The leftmost column of the source area. |
sourceTop | The topmost row of the source area. |
sourceWidth | The number of columns in the source area. |
sourceHeight | The number of rows in the source area. |
targetLeft | The leftmost column of the destination area. |
targetTop | The topmost row of the destination area. |
T:System.ArgumentOutOfRangeException | One or more of the parameters is less than zero.-or- sourceLeft or targetLeft is greater than or equal to P:System.Console.BufferWidth.-or- sourceTop or targetTop is greater than or equal to P:System.Console.BufferHeight.-or- sourceTop + sourceHeight is greater than or equal to P:System.Console.BufferHeight.-or- sourceLeft + sourceWidth is greater than or equal to P:System.Console.BufferWidth. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1188 of file Console.cs.
|
static |
Copies a specified source area of the screen buffer to a specified destination area.
sourceLeft | The leftmost column of the source area. |
sourceTop | The topmost row of the source area. |
sourceWidth | The number of columns in the source area. |
sourceHeight | The number of rows in the source area. |
targetLeft | The leftmost column of the destination area. |
targetTop | The topmost row of the destination area. |
sourceChar | The character used to fill the source area. |
sourceForeColor | The foreground color used to fill the source area. |
sourceBackColor | The background color used to fill the source area. |
T:System.ArgumentOutOfRangeException | One or more of the parameters is less than zero.-or- sourceLeft or targetLeft is greater than or equal to P:System.Console.BufferWidth.-or- sourceTop or targetTop is greater than or equal to P:System.Console.BufferHeight.-or- sourceTop + sourceHeight is greater than or equal to P:System.Console.BufferHeight.-or- sourceLeft + sourceWidth is greater than or equal to P:System.Console.BufferWidth. |
T:System.ArgumentException | One or both of the color parameters is not a member of the T:System.ConsoleColor enumeration. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1212 of file Console.cs.
|
static |
Acquires the standard error stream.
Definition at line 1695 of file Console.cs.
|
static |
Acquires the standard error stream, which is set to a specified buffer size.
bufferSize | The internal stream buffer size. |
T:System.ArgumentOutOfRangeException | bufferSize is less than or equal to zero. |
Definition at line 1706 of file Console.cs.
|
static |
Acquires the standard input stream.
Definition at line 1718 of file Console.cs.
|
static |
Acquires the standard input stream, which is set to a specified buffer size.
bufferSize | The internal stream buffer size. |
T:System.ArgumentOutOfRangeException | bufferSize is less than or equal to zero. |
Definition at line 1729 of file Console.cs.
|
static |
Acquires the standard output stream.
Definition at line 1741 of file Console.cs.
|
static |
Acquires the standard output stream, which is set to a specified buffer size.
bufferSize | The internal stream buffer size. |
T:System.ArgumentOutOfRangeException | bufferSize is less than or equal to zero. |
Definition at line 1752 of file Console.cs.
|
static |
Reads the next character from the standard input stream.
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1831 of file Console.cs.
|
static |
Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window.
T:System.InvalidOperationException | The P:System.Console.In property is redirected from some stream other than the console. |
Definition at line 1536 of file Console.cs.
|
static |
Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window.
intercept | Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false . |
T:System.InvalidOperationException | The P:System.Console.In property is redirected from some stream other than the console. |
Definition at line 1574 of file Console.cs.
|
static |
Reads the next line of characters from the standard input stream.
null
if no more lines are available.T:System.IO.IOException | An I/O error occurred. |
T:System.OutOfMemoryException | There is insufficient memory to allocate a buffer for the returned string. |
T:System.ArgumentOutOfRangeException | The number of characters in the next line of characters is greater than F:System.Int32.MaxValue. |
Definition at line 1843 of file Console.cs.
|
static |
Sets the foreground and background console colors to their defaults.
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1162 of file Console.cs.
|
static |
Sets the height and width of the screen buffer area to the specified values.
width | The width of the buffer area measured in columns. |
height | The height of the buffer area measured in rows. |
T:System.ArgumentOutOfRangeException | height or width is less than or equal to zero.-or- height or width is greater than or equal to F:System.Int16.MaxValue.-or- width is less than P:System.Console.WindowLeft + P:System.Console.WindowWidth.-or- height is less than P:System.Console.WindowTop + P:System.Console.WindowHeight. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1358 of file Console.cs.
|
static |
Sets the position of the cursor.
left | The column position of the cursor. Columns are numbered from left to right starting at 0. |
top | The row position of the cursor. Rows are numbered from top to bottom starting at 0. |
T:System.ArgumentOutOfRangeException | left or top is less than zero.-or- left is greater than or equal to P:System.Console.BufferWidth.-or- top is greater than or equal to P:System.Console.BufferHeight. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1496 of file Console.cs.
|
static |
Sets the P:System.Console.Error property to the specified T:System.IO.TextWriter object.
newError | A stream that is the new standard error output. |
T:System.ArgumentNullException | newError is null . |
T:System.Security.SecurityException | The caller does not have the required permission. |
Definition at line 1811 of file Console.cs.
|
static |
Sets the P:System.Console.In property to the specified T:System.IO.TextReader object.
newIn | A stream that is the new standard input. |
T:System.ArgumentNullException | newIn is null . |
T:System.Security.SecurityException | The caller does not have the required permission. |
Definition at line 1768 of file Console.cs.
|
static |
Sets the P:System.Console.Out property to the specified T:System.IO.TextWriter object.
newOut | A stream that is the new standard output. |
T:System.ArgumentNullException | newOut is null . |
T:System.Security.SecurityException | The caller does not have the required permission. |
Definition at line 1789 of file Console.cs.
|
static |
Sets the position of the console window relative to the screen buffer.
left | The column position of the upper left corner of the console window. |
top | The row position of the upper left corner of the console window. |
T:System.ArgumentOutOfRangeException | left or top is less than zero.-or- left + P:System.Console.WindowWidth is greater than P:System.Console.BufferWidth.-or- top + P:System.Console.WindowHeight is greater than P:System.Console.BufferHeight. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1461 of file Console.cs.
|
static |
Sets the height and width of the console window to the specified values.
width | The width of the console window measured in columns. |
height | The height of the console window measured in rows. |
T:System.ArgumentOutOfRangeException | width or height is less than or equal to zero.-or- width plus P:System.Console.WindowLeft or height plus P:System.Console.WindowTop is greater than or equal to F:System.Int16.MaxValue. -or- width or height is greater than the largest possible window width or height for the current screen resolution and console font. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1390 of file Console.cs.
|
static |
Writes the text representation of the specified object to the standard output stream using the specified format information.
format | A composite format string (see Remarks). |
arg0 | An object to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2091 of file Console.cs.
|
static |
Writes the text representation of the specified objects to the standard output stream using the specified format information.
format | A composite format string (see Remarks). |
arg0 | The first object to write using format . |
arg1 | The second object to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2106 of file Console.cs.
|
static |
Writes the text representation of the specified objects to the standard output stream using the specified format information.
format | A composite format string (see Remarks). |
arg0 | The first object to write using format . |
arg1 | The second object to write using format . |
arg2 | The third object to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2122 of file Console.cs.
|
static |
Writes the text representation of the specified array of objects to the standard output stream using the specified format information.
format | A composite format string (see Remarks). |
arg | An array of objects to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format or arg is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2155 of file Console.cs.
|
static |
Writes the text representation of the specified Boolean value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2172 of file Console.cs.
|
static |
Writes the specified Unicode character value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2182 of file Console.cs.
|
static |
Writes the specified array of Unicode characters to the standard output stream.
buffer | A Unicode character array. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2192 of file Console.cs.
|
static |
Writes the specified subarray of Unicode characters to the standard output stream.
buffer | An array of Unicode characters. |
index | The starting position in buffer . |
count | The number of characters to write. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | index or count is less than zero. |
T:System.ArgumentException | index plus count specify a position that is not within buffer . |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2210 of file Console.cs.
|
static |
Writes the text representation of the specified double-precision floating-point value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2220 of file Console.cs.
|
static |
Writes the text representation of the specified T:System.Decimal value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2230 of file Console.cs.
|
static |
Writes the text representation of the specified single-precision floating-point value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2240 of file Console.cs.
|
static |
Writes the text representation of the specified 32-bit signed integer value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2250 of file Console.cs.
|
static |
Writes the text representation of the specified 32-bit unsigned integer value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2261 of file Console.cs.
|
static |
Writes the text representation of the specified 64-bit signed integer value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2271 of file Console.cs.
|
static |
Writes the text representation of the specified 64-bit unsigned integer value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2282 of file Console.cs.
|
static |
Writes the text representation of the specified object to the standard output stream.
value | The value to write, or null . |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2292 of file Console.cs.
|
static |
Writes the specified string value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 2302 of file Console.cs.
|
static |
Writes the current line terminator to the standard output stream.
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1852 of file Console.cs.
|
static |
Writes the text representation of the specified Boolean value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1862 of file Console.cs.
|
static |
Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1872 of file Console.cs.
|
static |
Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream.
buffer | A Unicode character array. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1882 of file Console.cs.
|
static |
Writes the specified subarray of Unicode characters, followed by the current line terminator, to the standard output stream.
buffer | An array of Unicode characters. |
index | The starting position in buffer . |
count | The number of characters to write. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | index or count is less than zero. |
T:System.ArgumentException | index plus count specify a position that is not within buffer . |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1900 of file Console.cs.
|
static |
Writes the text representation of the specified T:System.Decimal value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1910 of file Console.cs.
|
static |
Writes the text representation of the specified double-precision floating-point value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1920 of file Console.cs.
|
static |
Writes the text representation of the specified single-precision floating-point value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1930 of file Console.cs.
|
static |
Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1940 of file Console.cs.
|
static |
Writes the text representation of the specified 32-bit unsigned integer value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1951 of file Console.cs.
|
static |
Writes the text representation of the specified 64-bit signed integer value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1961 of file Console.cs.
|
static |
Writes the text representation of the specified 64-bit unsigned integer value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1972 of file Console.cs.
|
static |
Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1982 of file Console.cs.
|
static |
Writes the specified string value, followed by the current line terminator, to the standard output stream.
value | The value to write. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 1992 of file Console.cs.
|
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.
format | A composite format string (see Remarks). |
arg0 | An object to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2006 of file Console.cs.
|
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.
format | A composite format string (see Remarks). |
arg0 | The first object to write using format . |
arg1 | The second object to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2021 of file Console.cs.
|
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.
format | A composite format string (see Remarks). |
arg0 | The first object to write using format . |
arg1 | The second object to write using format . |
arg2 | The third object to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2037 of file Console.cs.
|
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.
format | A composite format string (see Remarks). |
arg | An array of objects to write using format . |
T:System.IO.IOException | An I/O error occurred. |
T:System.ArgumentNullException | format or arg is null . |
T:System.FormatException | The format specification in format is invalid. |
Definition at line 2070 of file Console.cs.
|
staticgetset |
Gets or sets the background color of the console.
T:System.ArgumentException | The color specified in a set operation is not a valid member of T:System.ConsoleColor. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 463 of file Console.cs.
|
staticgetset |
Gets or sets the height of the buffer area.
T:System.ArgumentOutOfRangeException | The value in a set operation is less than or equal to zero.-or- The value in a set operation is greater than or equal to F:System.Int16.MaxValue.-or- The value in a set operation is less than P:System.Console.WindowTop + P:System.Console.WindowHeight. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 535 of file Console.cs.
|
staticgetset |
Gets or sets the width of the buffer area.
T:System.ArgumentOutOfRangeException | The value in a set operation is less than or equal to zero.-or- The value in a set operation is greater than or equal to F:System.Int16.MaxValue.-or- The value in a set operation is less than P:System.Console.WindowLeft + P:System.Console.WindowWidth. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 554 of file Console.cs.
|
staticaddremove |
Occurs when the F:System.ConsoleModifiers.Control modifier key (Ctrl) and either the F:System.ConsoleKey.C console key (C) or the Break key are pressed simultaneously (Ctrl+C or Ctrl+Break).
Definition at line 929 of file Console.cs.
|
staticget |
Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off.
true
if CAPS LOCK is turned on; false
if CAPS LOCK is turned off.Definition at line 878 of file Console.cs.
|
staticgetset |
Gets or sets the column position of the cursor within the buffer area.
T:System.ArgumentOutOfRangeException | The value in a set operation is less than zero.-or- The value in a set operation is greater than or equal to P:System.Console.BufferWidth. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 669 of file Console.cs.
|
staticgetset |
Gets or sets the height of the cursor within a character cell.
T:System.ArgumentOutOfRangeException | The value specified in a set operation is less than 1 or greater than 100. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 707 of file Console.cs.
|
staticgetset |
Gets or sets the row position of the cursor within the buffer area.
T:System.ArgumentOutOfRangeException | The value in a set operation is less than zero.-or- The value in a set operation is greater than or equal to P:System.Console.BufferHeight. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 688 of file Console.cs.
|
staticgetset |
Gets or sets a value indicating whether the cursor is visible.
true
if the cursor is visible; otherwise, false
.T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 745 of file Console.cs.
|
staticget |
Gets the standard error output stream.
Definition at line 338 of file Console.cs.
|
staticgetset |
Gets or sets the foreground color of the console.
T:System.ArgumentException | The color specified in a set operation is not a valid member of T:System.ConsoleColor. |
T:System.Security.SecurityException | The user does not have permission to perform this action. |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 499 of file Console.cs.
|
staticget |
Gets the standard input stream.
Definition at line 289 of file Console.cs.
|
staticgetset |
Gets or sets the encoding the console uses to read input.
T:System.ArgumentNullException | The property value in a set operation is null . |
T:System.IO.IOException | An error occurred during the execution of this operation. |
T:System.Security.SecurityException | Your application does not have permission to perform this operation. |
Definition at line 356 of file Console.cs.
|
staticget |
Gets a value that indicates whether the error output stream has been redirected from the standard error stream.
true
if error output is redirected; otherwise, false
.Definition at line 264 of file Console.cs.
|
staticget |
Gets a value that indicates whether input has been redirected from the standard input stream.
true
if input is redirected; otherwise, false
.Definition at line 214 of file Console.cs.
|
staticget |
Gets a value that indicates whether output has been redirected from the standard output stream.
true
if output is redirected; otherwise, false
.Definition at line 239 of file Console.cs.
|
staticget |
Gets a value indicating whether a key press is available in the input stream.
true
if a key press is available; otherwise, false
.T:System.IO.IOException | An I/O error occurred. |
T:System.InvalidOperationException | Standard input is redirected to a file instead of the keyboard. |
Definition at line 822 of file Console.cs.
|
staticget |
Gets the largest possible number of console window rows, based on the current font and screen resolution.
Definition at line 618 of file Console.cs.
|
staticget |
Gets the largest possible number of console window columns, based on the current font and screen resolution.
Definition at line 606 of file Console.cs.
|
staticget |
Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off.
true
if NUM LOCK is turned on; false
if NUM LOCK is turned off.Definition at line 865 of file Console.cs.
|
staticget |
Gets the standard output stream.
Definition at line 323 of file Console.cs.
|
staticgetset |
Gets or sets the encoding the console uses to write output.
T:System.ArgumentNullException | The property value in a set operation is null . |
T:System.IO.IOException | An error occurred during the execution of this operation. |
T:System.Security.SecurityException | Your application does not have permission to perform this operation. |
Definition at line 405 of file Console.cs.
|
staticgetset |
Gets or sets the title to display in the console title bar.
T:System.InvalidOperationException | In a get operation, the retrieved title is longer than 24500 characters. |
T:System.ArgumentOutOfRangeException | In a set operation, the specified title is longer than 24500 characters. |
T:System.ArgumentNullException | In a set operation, the specified title is null . |
T:System.IO.IOException | An I/O error occurred. |
Definition at line 780 of file Console.cs.
|
staticgetset |
Gets or sets a value indicating whether the combination of the F:System.ConsoleModifiers.Control modifier key and F:System.ConsoleKey.C console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system.
true
if Ctrl+C is treated as ordinary input; otherwise, false
.T:System.IO.IOException | Unable to get or set the input mode of the console input buffer. |
Definition at line 892 of file Console.cs.
|
staticgetset |
Gets or sets the height of the console window area.
T:System.ArgumentOutOfRangeException | The value of the P:System.Console.WindowWidth property or the value of the P:System.Console.WindowHeight property is less than or equal to 0.-or-The value of the P:System.Console.WindowHeight property plus the value of the P:System.Console.WindowTop property is greater than or equal to F:System.Int16.MaxValue.-or-The value of the P:System.Console.WindowWidth property or the value of the P:System.Console.WindowHeight property is greater than the largest possible window width or height for the current screen resolution and console font. |
T:System.IO.IOException | Error reading or writing information. |
Definition at line 572 of file Console.cs.
|
staticgetset |
Gets or sets the leftmost position of the console window area relative to the screen buffer.
T:System.ArgumentOutOfRangeException | In a set operation, the value to be assigned is less than zero.-or-As a result of the assignment, P:System.Console.WindowLeft plus P:System.Console.WindowWidth would exceed P:System.Console.BufferWidth. |
T:System.IO.IOException | Error reading or writing information. |
Definition at line 632 of file Console.cs.
|
staticgetset |
Gets or sets the top position of the console window area relative to the screen buffer.
T:System.ArgumentOutOfRangeException | In a set operation, the value to be assigned is less than zero.-or-As a result of the assignment, P:System.Console.WindowTop plus P:System.Console.WindowHeight would exceed P:System.Console.BufferHeight. |
T:System.IO.IOException | Error reading or writing information. |
Definition at line 650 of file Console.cs.
|
staticgetset |
Gets or sets the width of the console window.
T:System.ArgumentOutOfRangeException | The value of the P:System.Console.WindowWidth property or the value of the P:System.Console.WindowHeight property is less than or equal to 0.-or-The value of the P:System.Console.WindowHeight property plus the value of the P:System.Console.WindowTop property is greater than or equal to F:System.Int16.MaxValue.-or-The value of the P:System.Console.WindowWidth property or the value of the P:System.Console.WindowHeight property is greater than the largest possible window width or height for the current screen resolution and console font. |
T:System.IO.IOException | Error reading or writing information. |
Definition at line 590 of file Console.cs.