Console.Out Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the standard output stream.

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

static member Out : TextWriter with get

Property Value

Type: System.IO.TextWriter

A TextWriter that represents the standard output stream.

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

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

The following example uses the Out property to display an array containing the names of files in the application's current directory to the standard output device. It then sets the standard output to a file named Files.txt and lists the array elements to the file. Finally, it sets the output to the standard output stream and again displays the array elements to the standard output device.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top