C# Console Error

Description

Console Error gets the standard error output stream.

Syntax

Console.Error has the following syntax.


public static TextWriter Error { get; }

Example

The following example illustrates the use of the Error property.


using System;/*w  w w .j  av a2  s  .  co m*/
using System.IO;
public class ExpandTabs
{
    public static void Main(string[] args)
    {
        TextWriter errorWriter = Console.Error;
        errorWriter.WriteLine("java2s.com");


    }
}




















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