Sets the Console.Error property to the specified System.IO.TextWriter object.
Type Reason System.Security.SecurityException The caller does not have the required permission. ArgumentNullException newError is null.
By default, the Console.Error property is set to the standard error output stream.
A System.IO.StreamWriter that encapsulates a System.IO.FileStream can be used to send error messages to a file.
Type | Reason |
---|---|
System.Security.Permissions.SecurityPermissionFlag | Requires System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode permission. |