Επεξεργασία

Κοινή χρήση μέσω


TextWriter.CreateBroadcasting(TextWriter[]) Method

Definition

Creates an instance of TextWriter that writes supplied inputs to each of the writers in writers.

public:
 static System::IO::TextWriter ^ CreateBroadcasting(... cli::array <System::IO::TextWriter ^> ^ writers);
public static System.IO.TextWriter CreateBroadcasting (params System.IO.TextWriter[] writers);
static member CreateBroadcasting : System.IO.TextWriter[] -> System.IO.TextWriter
Public Shared Function CreateBroadcasting (ParamArray writers As TextWriter()) As TextWriter

Parameters

writers
TextWriter[]

The TextWriter instances to which all operations should be broadcast (multiplexed).

Returns

An instance of TextWriter that writes supplied inputs to each of the writers in writers

Exceptions

writers is null or it contains a null.

Remarks

The resulting instance will delegate each operation to each of the writers in writers. For example, calling Write(Char) will write the specified char to each writer, one after the other. The writers will be written to in the same order as they are specified in writers. An exception from the operation on one writer will prevent the operation from being performed on subsequent writers.

Encoding and FormatProvider will return the corresponding object from first writer in writers.

Applies to