Mono Class Library: System.Collections.Hashtable Overview | Members

System.Collections.Hashtable.Synchronized Method

Returns a synchronized (thread-safe) wrapper for the specified Hashtable. [Edit]

public static Hashtable Synchronized (Hashtable table)

Parameters

table
The Hashtable to synchronize. [Edit]

Returns

A synchronized (thread-safe) wrapper for table. [Edit]

Exceptions

TypeReason
ArgumentNullExceptiontable is null. [Edit]

Remarks

This method returns a new Hashtable instance that contains values equal to the values of table , and provides synchronized access to those values.

If more than one thread is to write to a Hashtable concurrently, all write operations are required to be done through this wrapper.

Note: A Hashtable can safely support one writer and multiple readers concurrently.

[Edit]

Requirements

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