Stream.Synchronized Method

Definition

Creates a thread-safe (synchronized) wrapper around the specified Stream object.

public static System.IO.Stream Synchronized (System.IO.Stream stream);
Parameters
stream
Stream

The Stream object to synchronize.

Returns

A thread-safe Stream object.

Exceptions

stream is null.

Remarks

This method returns a class that wraps the specified Stream object and restricts access to it from multiple threads. All access to the Stream object will be thread safe.