C# Console OpenStandardOutput()

Description

Console OpenStandardOutput() acquires the standard output stream.

Syntax

Console.OpenStandardOutput() has the following syntax.


[HostProtectionAttribute(SecurityAction.LinkDemand, UI = true)]
public static Stream OpenStandardOutput()

Returns

Console.OpenStandardOutput() method returns The standard output stream.

Example

The following example illustrates the use of the OpenStandardOutput method.


/*ww  w  .  jav  a 2 s  .com*/
using System;
using System.IO;

public class InsertTabs {
   public static void Main(){
        StreamWriter standardOutput = new StreamWriter(Console.OpenStandardOutput());
   }
}




















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version