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

System.Collections.Hashtable.SyncRoot Property

Gets a object that can be used to synchronize access to the current instance. [Edit]

public virtual object SyncRoot { get; }

Value

A object that can be used to synchronize access to the current instance. [Edit]

Remarks

This property is read-only.

A thread is required to perform synchronized operations only on the Hashtable.SyncRoot of a Hashtable, not directly on the table itself. This maintains proper synchronization with any other threads concurrently modifying the table.

Note: This property is implemented to support the ICollection interface.

Operation
As described above.

This method returns a reference to the current instance.

Note to Inheritors
Override this property to return an object on which to lock when implementing a collection that wraps another collection (using a subset of it, for example). This is useful when providing synchronized access through two or more wrapper collections to the same underlying collection. Typically, this property returns a reference to the current instance.

Usage
Use this property to obtain a object that can be used to synchronize access to the current instance.

[Edit]

Requirements

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