Sets the Console.Out property to the specified System.IO.TextWriter object.
Type Reason ArgumentNullException newOut is null.
By default, the Console.Out property is set to the standard output stream.
A System.IO.StreamWriter that encapsulates a System.IO.FileStream can be used to send output to a file. For example:
code reference: System.Console.SetOut#1
Type | Reason |
---|---|
System.Security.Permissions.SecurityPermissionFlag | Requires permission to execute unmanaged code. See System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode . |