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

System.Collections.ArrayList.Synchronized Method

Returns a ArrayList wrapper around the specified ArrayList that is synchronized (thread-safe).

public static ArrayList Synchronized (ArrayList list)

Parameters

list
The ArrayList to synchronize.

Returns

A ArrayList wrapper that is synchronized (thread-safe).

Exceptions

TypeReason
ArgumentNullExceptionlist is null.

Remarks

This method returns a thread-safe ArrayList that contains a reference to list. Any modifications of the elements in either the returned list or list will be reflected in the other.

Note:

The ArrayList.IsSynchronized property of the new list is true. Every other property value of the new list references the same property value of list.

By performing operations on the new list, this wrapper can be used to guarantee thread-safe access to the ArrayListlist.

Requirements

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