Редагувати

Поділитися через


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, 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>()

Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs

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

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

Applies to

SynchronizedReadOnlyCollection<T>(Object)

Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs

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 ^ syncRoot);
public SynchronizedReadOnlyCollection (object syncRoot);
new System.Collections.Generic.SynchronizedReadOnlyCollection<'T> : obj -> System.Collections.Generic.SynchronizedReadOnlyCollection<'T>
Public Sub New (syncRoot 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.

Applies to

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

Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs

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 ^ syncRoot, System::Collections::Generic::IEnumerable<T> ^ list);
public SynchronizedReadOnlyCollection (object syncRoot, System.Collections.Generic.IEnumerable<T> list);
new System.Collections.Generic.SynchronizedReadOnlyCollection<'T> : obj * seq<'T> -> System.Collections.Generic.SynchronizedReadOnlyCollection<'T>
Public Sub New (syncRoot 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.

Applies to

SynchronizedReadOnlyCollection<T>(Object, T[])

Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs
Source:
SynchronizedReadOnlyCollection.cs

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 ^ syncRoot, ... cli::array <T> ^ list);
public SynchronizedReadOnlyCollection (object syncRoot, params T[] list);
new System.Collections.Generic.SynchronizedReadOnlyCollection<'T> : obj * 'T[] -> System.Collections.Generic.SynchronizedReadOnlyCollection<'T>
Public Sub New (syncRoot 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