Mono Class Library: System.IO.TextWriter Overview | Members

System.IO.TextWriter.Synchronized Method

Creates a thread-safe wrapper around the specified System.IO.TextWriter instance.

public static TextWriter Synchronized (TextWriter writer)

Parameters

writer
The System.IO.TextWriter to synchronize.

Returns

A thread-safe System.IO.TextWriter .

Exceptions

TypeReason
ArgumentNullExceptionwriter is null.

Remarks

This method returns a class that wraps around the specified System.IO.TextWriter instance and restricts concurrent access to it by multiple threads.

Requirements

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