Search notes:

System.Console (class)

The System.Console class allows to programatically access stdin, stdout and stderr in console applications.

Properties, methods and events

BackgroundColor, ForegroundColor A member of the System.ConsoleColor enum.
Beep()
BufferHeight, BufferWidth
CancelKeyPress The only event: fired when ctrl+C or ctrl+break is pressed. See also TreatControlCAsInput()
CapsLock
Clear()
CursorLeft, CursorTop
CursorSize
CursorVisible
GetCursorPosition()
In, Out, Error stdin, stdout and stderr. These streams are provided using (derivates of) → System.IO.TextReader and System.IO.TextWriter objects.
InputEncoding, OutputEncoding Instances of types derived from System.Text.Encoding
IsErrorRedirected
IsInputRedirected
IsOutputRedirected
KeyAvailable
LargestWindowHeight
LargestWindowWidth
MoveBufferArea()
NumberLock
OpenStandardError()
OpenStandardInput()
OpenStandardOutput()
Read()
ReadKey()
ReadLine()
ResetColor()
SetBufferSize()
SetCursorPosition()
SetError()
SetIn()
SetOut()
SetWindowPosition()
SetWindowSize()
Title
TreatControlCAsInput See also CancelKeyPress
WindowHeight
WindowLeft
WindowTop
WindowWidth
Write()
WriteLine()

Encodings

Input and output encodings are controlled through the respective properties InputEncoding and OutputEncoding which need to be an instance of System.Text.Encoding.
Compare with the value of the PowerShell preference variable $OutputEncoding.

See also

The PowerShell cmdLet noun host
conhost.exe

Index