NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Console.SetError

Redirects Console.Error to the specified TextWriter. By default, Console.Error is set to the system's standard error stream.

[Visual Basic]
Public Shared Sub SetError( _
   ByVal newError As TextWriter _
)
[C#]
public static void SetError(
   TextWriter newError
);
[C++]
public: static void SetError(
   TextWriter* newError
);
[JScript]
public static function SetError(
   newError : TextWriter
);

Parameters

newError
The new standard error stream.

Exceptions

Exception Type Condition
ArgumentException newError is null.
SecurityException The caller does not have to set the standard error stream.

Remarks

A StreamWriter that encapsulates a FileStream can be used to send error messages to a file.

Requirements

NGWS Runtime Security:

SecurityPermission Unmanaged code permission.

See Also

Console Class | Console Members | System Namespace