SynchronizedCollection<T> Constructeurs

Définition

Initialise une nouvelle instance de la classe SynchronizedCollection<T>.

Surcharges

SynchronizedCollection<T>()

Initialise une nouvelle instance de la classe SynchronizedCollection<T>.

SynchronizedCollection<T>(Object)

Initialise une nouvelle instance de la classe SynchronizedCollection<T> avec l'objet utilisé pour synchroniser l'accès à la collection thread-safe.

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

Initialise une nouvelle instance de la classe SynchronizedCollection<T> dans une liste énumérable spécifiée d’éléments et avec l’objet utilisé pour synchroniser l’accès à la collection thread-safe.

SynchronizedCollection<T>(Object, T[])

Initialise une nouvelle instance de la classe SynchronizedCollection<T> dans un tableau spécifié d’éléments et avec l’objet utilisé pour synchroniser l’accès à la collection thread-safe.

SynchronizedCollection<T>()

Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs

Initialise une nouvelle instance de la classe SynchronizedCollection<T>.

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

S’applique à

SynchronizedCollection<T>(Object)

Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs

Initialise une nouvelle instance de la classe SynchronizedCollection<T> avec l'objet utilisé pour synchroniser l'accès à la collection thread-safe.

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

Paramètres

syncRoot
Object

Objet utilisé pour synchroniser l’accès à la collection thread-safe.

Exceptions

syncRoot a la valeur null.

Remarques

Si plusieurs instances de SynchronizedCollection<T> sont créées à l'aide du même syncRoot, l'accès est protégé dans toutes les instances.

S’applique à

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

Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs

Initialise une nouvelle instance de la classe SynchronizedCollection<T> dans une liste énumérable spécifiée d’éléments et avec l’objet utilisé pour synchroniser l’accès à la collection thread-safe.

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

Paramètres

syncRoot
Object

Objet utilisé pour synchroniser l’accès à la collection thread-safe.

list
IEnumerable<T>

Collection d'éléments IEnumerable<T> permettant d'initialiser la collection thread-safe.

Exceptions

syncRoot ou list est null.

S’applique à

SynchronizedCollection<T>(Object, T[])

Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs
Source:
SynchronizedCollection.cs

Initialise une nouvelle instance de la classe SynchronizedCollection<T> dans un tableau spécifié d’éléments et avec l’objet utilisé pour synchroniser l’accès à la collection thread-safe.

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

Paramètres

syncRoot
Object

Objet utilisé pour synchroniser l’accès à la collection thread-safe.

list
T[]

Éléments Array de type T utilisés pour initialiser la collection thread-safe.

Exceptions

syncRoot ou list est null.

S’applique à