Console Class

July 28, 2014

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

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

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static class Console

The Console type exposes the following members.

  NameDescription
Public propertyStatic memberErrorInfrastructure. Gets the standard error output stream.
Public propertyStatic memberInInfrastructure. Gets the standard input stream.
Public propertyStatic memberOutInfrastructure. Gets the standard output stream.
Top

  NameDescription
Public methodStatic memberReadLineInfrastructure. Reads a line of characters from the console.
Public methodStatic memberSetErrorInfrastructure. Security Critical. Sets the Error property.
Public methodStatic memberSetInInfrastructure. Security Critical. Sets the In property.
Public methodStatic memberSetOutInfrastructure. Security Critical. Sets the Out property.
Public methodStatic memberWrite(Char)Infrastructure. Writes the specified Unicode character value to the standard output stream.
Public methodStatic memberWrite(Char[])Infrastructure. Writes the specified array of Unicode characters to the standard output stream.
Public methodStatic memberWrite(Int32)Infrastructure. Writes the text representation of the specified 32-bit signed integer value to the standard output stream.
Public methodStatic memberWrite(Object)Infrastructure. Writes the text representation of the specified object to the standard output stream.
Public methodStatic memberWrite(String)Infrastructure. Writes the specified string value to the standard output stream.
Public methodStatic memberWrite(String, Object)Infrastructure. Writes the text representation of the specified object to the standard output stream using the specified format information.
Public methodStatic memberWrite(String, Object[])Infrastructure. Writes the text representation of the specified array of objects to the standard output stream using the specified format information.
Public methodStatic memberWrite(Char[], Int32, Int32)Infrastructure. Writes the specified subarray of Unicode characters to the standard output stream.
Public methodStatic memberWrite(String, Object, Object)Infrastructure. Writes the text representation of the specified objects to the standard output stream using the specified format information.
Public methodStatic memberWrite(String, Object, Object, Object)Infrastructure. Writes the text representation of the specified objects to the standard output stream using the specified format information.
Public methodStatic memberWriteLine()Infrastructure. Writes the current line terminator to the standard output stream.
Public methodStatic memberWriteLine(Char)Infrastructure. Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream.
Public methodStatic memberWriteLine(Char[])Infrastructure. Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream.
Public methodStatic memberWriteLine(Int32)Infrastructure. Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream.
Public methodStatic memberWriteLine(Object)Infrastructure. Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream.
Public methodStatic memberWriteLine(String)Infrastructure. Writes the specified string value, followed by the current line terminator, to the standard output stream.
Public methodStatic memberWriteLine(String, Object)Infrastructure. Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream using the specified format information.
Public methodStatic memberWriteLine(String, Object[])Infrastructure. Writes the text representation of the specified array of objects, followed by the current line terminator, to the standard output stream using the specified format information.
Public methodStatic memberWriteLine(String, Object, Object)Infrastructure. Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.
Public methodStatic memberWriteLine(String, Object, Object, Object)Infrastructure. Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information.
Top

The console is unavailable in a Windows Phone application.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft