SynchronizedReadOnlyCollection<T> Constructors

Definition

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class.

Overloads

SynchronizedReadOnlyCollection<T>()

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class.

SynchronizedReadOnlyCollection<T>(Object)

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class with the object used to synchronize access to the thread-safe, read-only collection.

SynchronizedReadOnlyCollection<T>(Object, List<T>, Boolean)
SynchronizedReadOnlyCollection<T>(Object, IEnumerable<T>)

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class from a specified enumerable list of elements and with the object used to synchronize access to the thread-safe, read-only collection.

SynchronizedReadOnlyCollection<T>(Object, T[])

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class from a specified array of elements and with the object used to synchronize access to the thread-safe, read-only collection.

SynchronizedReadOnlyCollection<T>()

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class.

public:
 SynchronizedReadOnlyCollection();
public SynchronizedReadOnlyCollection ();
Public Sub New ()

SynchronizedReadOnlyCollection<T>(Object)

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class with the object used to synchronize access to the thread-safe, read-only collection.

public:
 SynchronizedReadOnlyCollection(System::Object ^ sync_root);
public SynchronizedReadOnlyCollection (object sync_root);
new System.Collections.Generic.SynchronizedReadOnlyCollection<'T> : obj -> System.Collections.Generic.SynchronizedReadOnlyCollection<'T>
Public Sub New (sync_root As Object)

Parameters

syncRoot
Object

The object used to synchronize access to the thread-safe, read-only collection.

Exceptions

syncRoot is null.

Remarks

If multiple instances of the SynchronizedReadOnlyCollection<T> are created using the same syncRoot, then access is protected across all instances.

SynchronizedReadOnlyCollection<T>(Object, List<T>, Boolean)

public:
 SynchronizedReadOnlyCollection(System::Object ^ sync_root, System::Collections::Generic::List<T> ^ list, bool make_copy);
public SynchronizedReadOnlyCollection (object sync_root, System.Collections.Generic.List<T> list, bool make_copy);
new System.Collections.Generic.SynchronizedReadOnlyCollection<'T> : obj * System.Collections.Generic.List<'T> * bool -> System.Collections.Generic.SynchronizedReadOnlyCollection<'T>
Public Sub New (sync_root As Object, list As List(Of T), make_copy As Boolean)

Parameters

sync_root
Object
list
List<T>
make_copy
Boolean

SynchronizedReadOnlyCollection<T>(Object, IEnumerable<T>)

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class from a specified enumerable list of elements and with the object used to synchronize access to the thread-safe, read-only collection.

public:
 SynchronizedReadOnlyCollection(System::Object ^ sync_root, System::Collections::Generic::IEnumerable<T> ^ list);
public SynchronizedReadOnlyCollection (object sync_root, System.Collections.Generic.IEnumerable<T> list);
new System.Collections.Generic.SynchronizedReadOnlyCollection<'T> : obj * seq<'T> -> System.Collections.Generic.SynchronizedReadOnlyCollection<'T>
Public Sub New (sync_root As Object, list As IEnumerable(Of T))

Parameters

syncRoot
Object

The object used to synchronize access to the thread-safe, read-only collection.

list
IEnumerable<T>

The IEnumerable<T> collection of elements used to initialize the thread-safe, read-only collection.

Exceptions

syncRoot or list is null.

SynchronizedReadOnlyCollection<T>(Object, T[])

Initializes a new instance of the SynchronizedReadOnlyCollection<T> class from a specified array of elements and with the object used to synchronize access to the thread-safe, read-only collection.

public:
 SynchronizedReadOnlyCollection(System::Object ^ sync_root, ... cli::array <T> ^ list);
public SynchronizedReadOnlyCollection (object sync_root, params T[] list);
new System.Collections.Generic.SynchronizedReadOnlyCollection<'T> : obj * 'T[] -> System.Collections.Generic.SynchronizedReadOnlyCollection<'T>
Public Sub New (sync_root As Object, ParamArray list As T())

Parameters

syncRoot
Object

The object used to synchronize access to the thread-safe, read-only collection.

list
T[]

The Array of type T elements used to initialize the thread-safe, read-only collection.

Exceptions

syncRoot or list is null.

Applies to