BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 This type is safe for multithreaded operations. System.Object

The following example demonstrates the use of basic input and output functions. The program waits for the user to enter a name.

`using System; public class ConsoleTest { public static void Main() { Console.Write("Hello "); Console.WriteLine("World!"); Console.Write("What is your name: "); string name = Console.ReadLine(); Console.Write("Hello, "); Console.Write(name); Console.WriteLine("!"); } }`

The output for a user who entered the name "Fred" is

Hello World!

What is your name: Fred

Hello, Fred!

The console is an operating system window where users interact with the operating system or with a text-based console application by entering text input through the computer keyboard, and by reading text output from the computer terminal. For example, in the Windows operating system, the console is called the Command Prompt window and accepts MS-DOS commands. The class provides basic support for applications that read characters from, and write characters to, the console.

For information about developing with the class, see the following sections:

Console I/O Streams

Screen Buffer and Console Window

Unicode Support for the Console

Common Operations

## Console I/O Streams

When a console application starts, the operating system automatically associates three I/O streams with the console: standard input stream, standard output stream, and standard error output stream. Your application can read user input from the standard input stream; write normal data to the standard output stream; and write error data to the standard error output stream. These streams are presented to your application as the values of the , , and properties.

By default, the value of the property is a object, and the values of the and properties are objects. However, you can set these properties to streams that do not represent the console; for example, you can set these properties to streams that represent files. To redirect the standard input, standard output, or standard error stream, call the , , or method, respectively. I/O operations that use these streams are synchronized, which means that multiple threads can read from, or write to, the streams.

Do not use the class to display output in unattended applications, such as server applications. Calls to methods such as and have no effect in GUI applications.

class members that work normally when the underlying stream is directed to a console might throw an exception if the stream is redirected, for example, to a file. Program your application to catch exceptions if you redirect a standard stream. You can also use the , , and properties to determine whether a standard stream is redirected before performing an operation that throws an exception.

It is sometimes useful to explicitly call the members of the stream objects represented by the , , and properties. For example, by default, the method reads input from the standard input stream. Similarly, the method writes data to the standard output stream, and the data is followed by the default line termination string, which is a carriage return and line feed ("\r\n"). However, the class does not provide a corresponding method to write data to the standard error output stream, or a property to change the line termination string for data written to that stream.

You can solve this problem by setting the property of the or property to another line termination string. For example, the following C# statement sets the line termination string for the standard error output stream to two carriage return and line feed sequences:

Console.Error.NewLine = "\r\n\r\n";

You can then explicitly call the method of the error output stream object, as in the following C# statement:

Console.Error.WriteLine();

## Screen Buffer and Console Window

Two closely related features of the console are the screen buffer and the console window. Text is actually read from or written to streams owned by the console, but appear to be read from or written to an area owned by the console called the screen buffer. The screen buffer is an attribute of the console, and is organized as a rectangular grid of rows and columns where each grid intersection, or character cell, can contain a character. Each character has its own foreground color, and each character cell has its own background color.

The screen buffer is viewed through a rectangular region called the console window. The console window is another attribute of the console; it is not the console itself, which is an operating system window. The console window is arranged in rows and columns, is less than or equal to the size of the screen buffer, and can be moved to view different areas of the underlying screen buffer. If the screen buffer is larger than the console window, the console automatically displays scroll bars so the console window can be repositioned over the screen buffer area.

A cursor indicates the screen buffer position where text is currently read or written. The cursor can be hidden or made visible, and its height can be changed. If the cursor is visible, the console window position is moved automatically so the cursor is always in view.

The origin for character cell coordinates in the screen buffer is the upper left corner, and the positions of the cursor and the console window are measured relative to that origin. Use zero-based indexes to specify positions; that is, specify the topmost row as row 0, and the leftmost column as column 0. The maximum value for the row and column indexes is .

## Unicode Support for the Console

In general, the console reads input and writes output by using the current console code page, which the system locale defines by default. A code page can handle only a subset of available Unicode characters, so if you try to display characters that are not mapped by a particular code page, the console won't be able to display all characters or represent them accurately. The following example illustrates this problem. It tries to display the characters of the Cyrillic alphabet from U+0410 to U+044F to the console. If you run the example on a system that uses console code page 437, each character is replaced by a question mark (?), because Cyrillic characters do not map to the characters in code page 437.

code reference: System.Console.Class#1

In addition to supporting code pages, the class supports UTF-8 encoding with the class. Beginning with the .NET Framework 4.5, the class also supports UTF-16 encoding with the class. To display Unicode characters to the console. you set the property to either or .

Support for Unicode characters requires the encoder to recognize a particular Unicode character, and also requires a font that has the glyphs needed to render that character. To successfully display Unicode characters to the console, the console font must be set to a non-raster or TrueType font such as Consolas or Lucida Console. The following example shows how you can programmatically change the font from a raster font to Lucida Console.

code reference: System.Console.Class.Unsafe#3

However, TrueType fonts can display only a subset of glyphs. For example, the Lucida Console font displays only 643 of the approximately 64,000 available characters from U+0021 to U+FB02. To see which characters a particular font supports, open the Fonts applet in Control Panel, choose the Find a character option, and choose the font whose character set you'd like to examine in the Font list of the Character Map window.

Windows uses font linking to display glyphs that are not available in a particular font. For information about font linking to display additional character sets, see Globalization Step-by-Step: Fonts. Linked fonts are defined in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink subkey of the registry. Each entry associated with this subkey corresponds to the name of a base font, and its value is a string array that defines the font files and the fonts that are linked to the base font. Each member of the array defines a linked font and takes the form font-file-name,font-name. The following example illustrates how you can programmatically define a linked font named SimSun found in a font file named simsun.ttc that displays Simplified Han characters.

code reference: System.Console.Class#2

Unicode support for the console has the following limitations:

UTF-32 encoding is not supported. The only supported Unicode encodings are UTF-8 and UTF-16, which are represented by the and classes, respectively.

Bidirectional output is not supported.

Display of characters outside the Basic Multilingual Plane (that is, of surrogate pairs) is not supported, even if they are defined in a linked font file.

Display of characters in complex scripts is not supported.

Combining character sequences (that is, characters that consist of a base character and one or more combining characters) are displayed as separate characters. To work around this limitation, you can normalize the string to be displayed by calling the method before sending output to the console. In the following example, a string that contains the combining character sequence U+0061 U+0308 is displayed to the console as two characters before the output string is normalized, and as a single character after the method is called.

code reference: System.Console.Class#5

Note that normalization is a viable solution only if the Unicode standard for the character includes a pre-composed form that corresponds to a particular combining character sequence.

If a font provides a glyph for a code point in the private use area, that glyph will be displayed. However, because characters in the private use area are application-specific, this may not be the expected glyph.

The following example displays a range of Unicode characters to the console. The example accepts three command-line parameters: the start of the range to display, the end of the range to display, and whether to use the current console encoding (false) or UTF-16 encoding (true). It assumes that the console is using a TrueType font.

code reference: System.Console.Class#4

## Common Operations

The class contains the following methods for reading console input and writing console output:

The overloads of the method read an individual character.

The method reads an entire line of input.

The method overloads convert an instance of a value type, an array of characters, or a set of objects to a formatted or unformatted string, and then write that string to the console.

A parallel set of method overloads output the same string as the overloads but also add a line termination string.

The class also contains methods and properties to perform the following operations:

Get or set the size of the screen buffer. The and properties let you get or set the buffer height and width, respectively, and the method lets you set the buffer size in a single method call.

Get or set the size of the console window. The and properties let you get or set the window height and width, respectively, and the method lets you set the window size in a single method call.

Get or set the size of the cursor. The property specifies the height of the cursor in a character cell.

Get or set the position of the console window relative to the screen buffer. The and properties let you get or set the top row and leftmost column of the screen buffer that appears in the console window, and the method lets you set these values in a single method call.

Get or set the position of the cursor by getting or setting the and properties, or set the position of the cursor by calling the method.

Move or clear data in the screen buffer by calling the or method.

Get or set the foreground and background colors by using the and properties, or reset the background and foreground to their default colors by calling the method.

Play the sound of a beep through the console speaker by calling the method.

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

- Property
  2.0.0.0
  4.0.0.0
  System.ConsoleColor To be added.

  A change to the property affects only output that is written to individual character cells after the background color is changed. To change the background color of the console window as a whole, set the property and call the method. The following example provides an illustration.

  code reference: System.Console.BackgroundColor#1

  A get operation for a Windows-based application, in which a console does not exist, returns .

  Gets or sets the background color of the console.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  By default, the beep plays at a frequency of 800 hertz for a duration of 200 milliseconds.

  The method is not supported on the 64-bit editions of Windows Vista and Windows XP.

  Plays the sound of a beep through the console speaker.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method is not supported on the 64-bit editions of Windows Vista and Windows XP.

  Plays the sound of a beep of a specified frequency and duration through the console speaker.

  The frequency of the beep, ranging from 37 to 32767 hertz. The duration of the beep measured in milliseconds.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  This property defines the number of rows (or lines) stored in the buffer that is accessed by a console mode window. In contrast, the property defines the number of rows that are actually displayed in the console window at any particular time. If the number of rows actually written to the buffer exceeds the number of rows defined by the property, the window can be scrolled vertically so that it displays a contiguous number of rows that are equal to the property and are located anywhere in the buffer.

  If a set operation decreases the value of the property, the uppermost lines are removed. For example, if the number of lines is reduced from 300 to 250, lines 0 through 49 are removed, and the existing lines 50 through 299 become lines 0 through 249.

  Gets or sets the height of the buffer area.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  If a set operation decreases the value of the property, the rightmost columns are removed. For example, if the number of columns is reduced from 80 to 60, columns 60 through 79 of each row are removed.

  Gets or sets the width of the buffer area.

- Event
  2.0.0.0
  4.0.0.0
  System.ConsoleCancelEventHandler

  This event is used in conjunction with and . The event enables a console application to intercept the Ctrl+C signal so the event handler can decide whether to continue executing or terminate. For more information about handling events, see Consuming Events.

  When the user presses either Ctrl+C or Ctrl+Break, the event is fired and the application's event handler is executed. The event handler is passed a object that has two useful properties:

  , which allows you to determine whether the handler was invoked as a result of the user pressing Ctrl+C (the property value is ) or Ctrl+Break (the property value is ).

  , which allows you to determine how to your application should respond to the user pressing Ctrl+C or Ctrl+Break. By default, the property is false, which causes program execution to terminate when the event handler exits. Changing its property to true specifies that the application should continue to execute.

  If your application has simple requirements, you can use the property instead of this event. By setting this property to false, you can ensure that your application always exits if the user presses Ctrl+C. By setting it to true, you can ensure that pressing Ctrl+C will not terminate the application.

  The event handler for this event is executed on a thread pool thread.

  Occurs when the modifier key (Ctrl) and either the console key (C) or the Break key are pressed simultaneously (Ctrl+C or Ctrl+Break).

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  Using the method is equivalent invoking the MS-DOS cls command in the command prompt window. When the method is called, the cursor automatically scrolls to the top-left corner of the window and the contents of the screen buffer are set to blanks using the current foreground background colors.

  Attempting to call the method when a console application's output is redirected to a file throws a . To prevent this, always wrap a call to the method in a try…catch block.

  Clears the console buffer and corresponding console window of display information.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added.

  Gets or sets the column position of the cursor within the buffer area.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The cursor appearance varies, ranging from a horizontal line at the bottom of the cell when the property value is 1, to completely filling the cell when the property value is 100.

  Gets or sets the height of the cursor within a character cell.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added.

  Gets or sets the row position of the cursor within the buffer area.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets or sets a value indicating whether the cursor is visible.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.TextWriter

  A synchronized object where error output is sent.

  This property is set to the standard error stream by default. This property can be set to another stream with the method.

  Gets the standard error output stream.

  0
- Property
  2.0.0.0
  4.0.0.0
  System.ConsoleColor To be added.

  A get operation for a Windows-based application, in which a console does not exist, returns .

  Gets or sets the foreground color of the console.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.TextReader

  A synchronized object from which user input is received.

  This property is set to the standard input stream by default. This property can be set to another stream with the method.

  Gets the standard input stream.

  0
- Property
  2.0.0.0
  4.0.0.0
  System.Text.Encoding To be added.

  The console uses the input encoding to translate keyboard input into a corresponding character. The input encoding incorporates a code page that maps 256 keyboard character codes to individual characters. Different code pages include different special characters, typically customized for a language or a group of languages.

  Starting with the net_v40_long, a property get operation may return a cached value instead of the console's current input encoding. This can occur if the value of the property is modified by some means other than an assignment to the property, such as calling the Windows SetConsoleCP function or using the chcp command from a PowerShell script.

  Gets or sets the encoding the console uses to read input.

- Property
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets a value that indicates whether the error output stream has been redirected from the standard error stream.

- Property
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets a value that indicates whether input has been redirected from the standard input stream.

- Property
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets a value that indicates whether output has been redirected from the standard output stream.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The property value is returned immediately; that is, the property does not block input until a key press is available.

  Use the property in conjunction with only the method, not the or methods.

  Gets a value indicating whether a key press is available in the input stream.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added.

  Gets the largest possible number of console window rows, based on the current font and screen resolution.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added.

  Gets the largest possible number of console window columns, based on the current font and screen resolution.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` `` ``

  If the destination and source parameters specify a position located outside the boundaries of the current screen buffer, only the portion of the source area that fits within the destination area is copied. That is, the source area is clipped to fit the current screen buffer.

  The method copies the source area to the destination area. If the destination area does not intersect the source area, the source area is filled with blanks using the current foreground and background colors. Otherwise, the intersected portion of the source area is not filled.

  Copies a specified source area of the screen buffer to a specified destination area.

  The leftmost column of the source area. The topmost row of the source area. The number of columns in the source area. The number of rows in the source area. The leftmost column of the destination area. The topmost row of the destination area.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` `` `` `` `` ``

  If the destination and source parameters specify a position located beyond the boundaries of the current screen buffer, only the portion of the source area that fits within the destination area is copied. That is, the source area is clipped to fit the current screen buffer.

  The method copies the source area to the destination area. If the destination area does not intersect the source area, the source area is filled with the character specified by , using the colors specified by and . Otherwise, the intersected portion of the source area is not filled.

  The method performs no operation if or is zero.

  Copies a specified source area of the screen buffer to a specified destination area.

  The leftmost column of the source area. The topmost row of the source area. The number of columns in the source area. The number of rows in the source area. The leftmost column of the destination area. The topmost row of the destination area. The character used to fill the source area. The foreground color used to fill the source area. The background color used to fill the source area.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream

  This method can be used to reacquire the standard error stream after it has been changed by the method.

  Acquires the standard error stream.

  The standard error stream.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream ``

  This method can be used to reacquire the standard error stream after it has been changed by the method.

  Acquires the standard error stream, which is set to a specified buffer size.

  The standard error stream.

  The internal stream buffer size. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream

  This method can be used to reacquire the standard input stream after it has been changed by the method.

  Acquires the standard input stream.

  The standard input stream.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream ``

  This method can be used to reacquire the standard output stream after it has been changed by the method.

  Acquires the standard input stream, which is set to a specified buffer size.

  The standard input stream.

  The internal stream buffer size. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream

  This method can be used to reacquire the standard output stream after it has been changed by the method.

  Acquires the standard output stream.

  The standard output stream.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream ``

  This method can be used to reacquire the standard output stream after it has been changed by the method.

  Acquires the standard output stream, which is set to a specified buffer size.

  The standard output stream.

  The internal stream buffer size. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.TextWriter

  A synchronized object where normal output is sent.

  This property is set to the standard output stream by default. This property can be set to another stream with the method.

  Note that calls to Console.Out.WriteLine methods are equivalent to calls to the corresponding methods.

  Gets the standard output stream.

  0
- Property
  2.0.0.0
  4.0.0.0
  System.Text.Encoding To be added.

  The console uses the output encoding to translate characters written by an application into corresponding console display characters. The default code page that the console uses is determined by the system locale.

  Starting with the net_v40_long, a property get operation may return a cached value instead of the console's current output encoding. This can occur if the value of the property is modified by some means other than an assignment to the property, such as calling the Windows SetConsoleOutputCP function.

  Gets or sets the encoding the console uses to write output.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 An I/O error occurred.

  The method blocks its return while you type input characters; it terminates when you press the key. Pressing Enter appends a platform-dependent line termination sequence to your input (for example, Windows appends a carriage return-linefeed sequence). Subsequent calls to the method retrieve your input one character at a time. After the final character is retrieved, blocks its return again and the cycle repeats.

  Note that you will not get a property value of -1 unless you perform one of the following actions: simultaneously press the modifier key and console key (Ctrl+Z), which signals the end-of-file condition; press an equivalent key that signals the end-of-file condition, such as the F6 function key in Windows; or redirect the input stream to a source, such as a text file, that has an actual end-of-file character.

  The method, or the property and method are preferable to using the method.

  Reads the next character from the standard input stream.

  The next character from the input stream, or negative one (-1) if there are currently no more characters to be read.

  0
- Method
  2.0.0.0
  4.0.0.0
  System.ConsoleKeyInfo

  The method waits, that is, blocks on the thread issuing the method, until a character or function key is pressed. A character or function key can be pressed in combination with one or more Alt, Ctrl, or Shift modifier keys. However, pressing a modifier key by itself will not cause the method to return.

  Depending on your application, you might want to use the method in conjunction with the property.

  The method reads from the keyboard even if the standard input is redirected to a file with the method.

  Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window.

  A object that describes the constant and Unicode character, if any, that correspond to the pressed console key. The object also describes, in a bitwise combination of values, whether one or more Shift, Alt, or Ctrl modifier keys was pressed simultaneously with the console key.

- Method
  2.0.0.0
  4.0.0.0
  System.ConsoleKeyInfo ``

  The method waits, that is, blocks on the thread issuing the method, until a character or function key is pressed. A character or function key can be pressed in combination with one or more Alt, Ctrl, or Shift modifier keys. However, pressing a modifier key by itself will not cause the method to return.

  If the parameter is true, the pressed key is intercepted and not displayed in the console window; otherwise, the pressed key is displayed.

  Depending on your application, you might want to use the method in conjunction with the property.

  The method reads from the keyboard even if the standard input is redirected to a file with the method.

  Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window.

  A object that describes the constant and Unicode character, if any, that correspond to the pressed console key. The object also describes, in a bitwise combination of values, whether one or more Shift, Alt, or Ctrl modifier keys was pressed simultaneously with the console key.

  Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String An I/O error occurred. There is insufficient memory to allocate a buffer for the returned string.

  A line is defined as a sequence of characters followed by a carriage return (hexadecimal 0x000d), a line feed (hexadecimal 0x000a), or the value of the property. The returned string does not contain the terminating character(s). By default, the method reads input from a 256-character input buffer. Because this includes the character(s), the method can read lines that contain up to 254 characters. To read longer lines, call the method.

  If this method throws , the reader's position in the underlying is advanced by the number of characters the method was able to read, but the characters already read into the internal buffer are discarded. Since the position of the reader in the stream cannot be changed, the characters already read are unrecoverable, and can be accessed only by reinitializing the . If the initial position within the stream is unknown or the stream does not support seeking, the underlying also needs to be reinitialized.

  To avoid such a situation and produce robust code you should use the method and store the read characters in a preallocated buffer.

  If the Ctrl+Z character is pressed when the method is reading input from the console, the method returns null. This enables the user to prevent further keyboard input when the method is called in a loop. The following example illustrates this scenario.

  code reference: System.Console.ReadLine#1

  Reads the next line of characters from the standard input stream.

  The next line of characters from the input stream, or null if no more lines are available.

  0
- Method
  2.0.0.0
  4.0.0.0
  System.Void

  The foreground and background colors are restored to the colors that existed when the current process began. For more information, see the and properties.

  Sets the foreground and background console colors to their defaults.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added.

  Sets the height and width of the screen buffer area to the specified values.

  The width of the buffer area measured in columns. The height of the buffer area measured in rows.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Use the method to specify where the next write operation in the console window is to begin. If the specified cursor position is outside the area that is currently visible in the console window, the window origin changes automatically to make the cursor visible.

  The cursor automatically moves to the next character position each time a character is written to the console window. If the cursor is at the bottom right character position of the console window, the next write operation causes the console window to scroll so the cursor remains visible. If you want to write a character to the bottom right character position without causing the console window to scroll, use the method to move a character to that position.

  Sets the position of the cursor.

  The column position of the cursor. Columns are numbered from left to right starting at 0. The row position of the cursor. Rows are numbered from top to bottom starting at 0.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` The caller does not have the required permission. is . Requires permission.

  By default, the property is set to the standard error output stream.

  A that encapsulates a can be used to send error messages to a file.

  Sets the property to the specified object.

  A stream that is the new standard error output. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` is . Requires permission to execute unmanaged code. See .

  By default, the property is set to the standard input stream.

  A that encapsulates a can be used to receive input from a file.

  Sets the property to the specified object.

  A stream that is the new standard input. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` is . Requires permission to execute unmanaged code. See .

  By default, the property is set to the standard output stream.

  A that encapsulates a can be used to send output to a file. For example:

  code reference: System.Console.SetOut#1

  Sets the property to the specified object.

  A stream that is the new standard output. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The operating system window displays the console window, and the console window displays a portion of the screen buffer. The method affects the position of the console window relative to the screen buffer, but does not affect the position of the operating system window relative to the desktop.

  The console and operating system windows generally do not affect each other. However, if the screen buffer cannot be displayed in the current boundaries of the console window, the operating system automatically appends scroll bars to the operating system window. In that case, moving the operating system window scroll bars affects the position of the console window, and moving the console window with the method affects the position of the operating system window scroll bars.

  Sets the position of the console window relative to the screen buffer.

  The column position of the upper left corner of the console window. The row position of the upper left corner of the console window.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added.

  Sets the height and width of the console window to the specified values.

  The width of the console window measured in columns. The height of the console window measured in rows.
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added.

  Gets or sets the title to display in the console title bar.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  If the value of the property is false and Ctrl+C is pressed, the pressed keys are not stored in the input buffer and the operating system terminates the currently executing process. This is the default value.

  Use this property judiciously because setting it to true has such a dramatic effect. Most users expect Ctrl+C to terminate a console application. If you disable the effect of Ctrl+C, the user must remember to use Ctrl+Break to terminate the application, which is a less familiar key combination.

  Gets or sets a value indicating whether the combination of the modifier key and console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added.

  Gets or sets the height of the console window area.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The console represents a rectangular window into a larger rectangular buffer area. Both the window and the buffer are measured vertically by their number of rows and horizontally by their number of columns. The dimensions of the buffer area are defined by the and properties. The dimensions of the console area are defined by the and properties. The property determines which column of the buffer area is displayed in the first column of the console window. The value of the property can range from 0 to - . Attempting to set it to a value outside that range throws an .

  When a console window first opens, the default value of the property is zero, which indicates that the first column shown by the console corresponds to the first column (the column at position zero) in the buffer area. The default width of both the console window and the buffer area is 80 columns. This means that the property can be modified only if the console window is made narrower or the buffer area is made wider.

  Note that if the width of the buffer area exceeds the width of the console window, the value of the property is automatically adjusted when the user uses the horizontal scroll bar to define the window's relationship to the buffer area.

  Gets or sets the leftmost position of the console window area relative to the screen buffer.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The console represents a rectangular window into a larger rectangular buffer area. Both the window and the buffer are measured vertically by their number of rows and horizontally by their number of columns. The dimensions of the buffer area are defined by the and properties. The dimensions of the console area are defined by the and properties. The property determines which row of the buffer area is displayed in the first column of the console window. The value of the property can range from 0 to - . Attempting to set it to a value outside that range throws an .

  Gets or sets the top position of the console window area relative to the screen buffer.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added.

  Gets or sets the width of the console window.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling , which outputs either or .

  Writes the text representation of the specified Boolean value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added. An I/O error occurred.

  Writes the specified Unicode character value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  This version of is equivalent to .( ).

  An I/O error occurred.

  Writes the specified array of Unicode characters to the standard output stream.

  A Unicode character array. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling .

  Writes the text representation of the specified value to the standard output stream.

  The value to write. 1 ExtendedNumerics
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  Writes the text representation of the specified double-precision floating-point value to the standard output stream.

  The value to write. 1 ExtendedNumerics
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  Writes the text representation of the specified 32-bit signed integer value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  Writes the text representation of the specified 64-bit signed integer value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  If is null, nothing is written and no exception is thrown. Otherwise, the ToString method of is called to produce its string representation, and the resulting string is written to the standard output stream.

  Writes the text representation of the specified object to the standard output stream.

  The value to write, or null. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  Writes the text representation of the specified single-precision floating-point value to the standard output stream.

  The value to write. 1 ExtendedNumerics
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  If value is null, nothing is written to the standard output stream.

  Writes the specified string value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  Writes the text representation of the specified 32-bit unsigned integer value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  Writes the text representation of the specified 64-bit unsigned integer value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is . An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (1).

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  Writes the text representation of the specified object to the standard output stream using the specified format information.

  A composite format string (see Remarks). An object to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `System.ParamArray`

  or is .

  An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to .Length.

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  Writes the text representation of the specified array of objects to the standard output stream using the specified format information.

  A composite format string (see Remarks). An array of objects to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  ( + ) is greater than the length of .

  An I/O error occurred. or is negative. is .

  This method writes characters starting at position of to the standard output stream.

  Writes the specified subarray of Unicode characters to the standard output stream.

  An array of Unicode characters. The starting position in . The number of characters to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` is . An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (2).

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  Writes the text representation of the specified objects to the standard output stream using the specified format information.

  A composite format string (see Remarks). The first object to write using . The second object to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` ``

  is .

  An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (3).

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  Writes the text representation of the specified objects to the standard output stream using the specified format information.

  A composite format string (see Remarks). The first object to write using . The second object to write using . The third object to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` `` `` `` ``

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  Writes the text representation of the specified objects and variable-length parameter list to the standard output stream using the specified format information.

  A composite format string (see Remarks). The first object to write using . The second object to write using . The third object to write using . The fourth object to write using .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void An I/O error occurred.

  The default line terminator is a string whose value is a carriage return followed by a line feed ("\r\n" in C#, or vbCrLf in Visual Basic). You can change the line terminator by setting the property of the property to another string. The example provides an illustration.

  Writes the current line terminator to the standard output stream.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified Boolean value, followed by the current line terminator, to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred. is .

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream.

  A Unicode character array. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified value, followed by the current line terminator, to the standard output stream.

  The value to write. 1 ExtendedNumerics
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified double-precision floating-point value, followed by the current line terminator, to the standard output stream.

  The value to write. 1 ExtendedNumerics
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified 64-bit signed integer value, followed by the current line terminator, to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  If is null, only the line terminator is written. Otherwise, the ToString method of is called to produce its string representation, and the resulting string is written to the standard output stream.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified single-precision floating-point value, followed by the current line terminator, to the standard output stream.

  The value to write. 1 ExtendedNumerics
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` An I/O error occurred.

  If value is null, only the line terminator is written to the standard output stream.

  For more information about the line terminator, see the Remarks section of the method.

  Writes the specified string value, followed by the current line terminator, to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified 32-bit unsigned integer value, followed by the current line terminator, to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` An I/O error occurred.

  The text representation of is produced by calling the method.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified 64-bit unsigned integer value, followed by the current line terminator, to the standard output stream.

  The value to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is . An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (1).

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream using the specified format information.

  A composite format string (see Remarks). An object to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `System.ParamArray`

  or is .

  An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to .Length .

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  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.

  A composite format string (see Remarks). An array of objects to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  ( + ) is greater than the length of .

  An I/O error occurred. or is negative. is .

  This method writes characters starting at position of to the standard output stream.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the specified subarray of Unicode characters, followed by the current line terminator, to the standard output stream.

  An array of Unicode characters. The starting position in . The number of characters to write. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` is . An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (2).

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.

  A composite format string (see Remarks). The first object to write using . The second object to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` is . An I/O error occurred.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (3).

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.

  A composite format string (see Remarks). The first object to write using . The second object to write using . The third object to write using . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` `` `` `` ``

  This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

  The parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

  The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics.

  For more information about the composite formatting feature supported by methods such as , , and some overloads of , see Composite Formatting.

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about date and time format specifiers, see Standard DateTime Format Strings and Custom DateTime Format Strings.

  For more information about enumeration format specifiers, see Enumeration Format Strings.

  For more information about formatting, see Formatting Types.

  For more information about the line terminator, see the Remarks section of the method that takes no parameters.

  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.

  A composite format string (see Remarks). The first object to write using . The second object to write using . The third object to write using . The fourth object to write using .
0