Console::Out Property

 

Gets the standard output stream.

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

public:
property TextWriter^ Out {
	[HostProtectionAttribute(SecurityAction::LinkDemand, UI = true)]
	static TextWriter^ 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
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: