Mono Class Library: System.Console Overview | Members

System.Console.SetError Method

Sets the Console.Error property to the specified System.IO.TextWriter . [Edit]

public static void SetError (System.IO.TextWriter newError)

Parameters

newError
A System.IO.TextWriter that becomes the new standard error output stream. [Edit]

Permissions

TypeReason
System.Security.Permissions.SecurityPermissionFlag [Edit] Requires System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode permission.

Exceptions

TypeReason
System.Security.SecurityExceptionThe caller does not have the required permission. [Edit]
ArgumentNullExceptionnewError is null. [Edit]

Remarks

This method replaces the Console.Error property with a synchronized System.IO.TextWriter returned by System.IO.TextWriter.Synchronized(System.IO.TextWriter)( newError ).

Note: By default, the Console.Error property is set to the system's standard error stream.

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0