SynchronizedCollection<T> Constructeurs
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la classe SynchronizedCollection<T>.
Surcharges
| Nom | Description |
|---|---|
| SynchronizedCollection<T>() |
Initialise une nouvelle instance de la classe SynchronizedCollection<T>. |
| SynchronizedCollection<T>(Object) |
Initialise une nouvelle instance de la SynchronizedCollection<T> classe avec l’objet utilisé pour synchroniser l’accès à la collection thread-safe. |
| SynchronizedCollection<T>(Object, IEnumerable<T>) |
Initialise une nouvelle instance de la SynchronizedCollection<T> classe à partir d’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 SynchronizedCollection<T> classe à partir d’un tableau d’éléments spécifié et avec l’objet utilisé pour synchroniser l’accès à la collection thread-safe. |
SynchronizedCollection<T>()
Initialise une nouvelle instance de la classe SynchronizedCollection<T>.
public:
SynchronizedCollection();
public SynchronizedCollection();
Public Sub New ()
S’applique à
SynchronizedCollection<T>(Object)
Initialise une nouvelle instance de la SynchronizedCollection<T> classe 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 du fichier SynchronizedCollection<T> sont créées à l’aide du même syncRootélément, l’accès est protégé sur toutes les instances.
S’applique à
SynchronizedCollection<T>(Object, IEnumerable<T>)
Initialise une nouvelle instance de la SynchronizedCollection<T> classe à partir d’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 IEnumerable<T> d’éléments utilisés pour initialiser la collection thread-safe.
Exceptions
syncRoot ou list est null.
S’applique à
SynchronizedCollection<T>(Object, T[])
Initialise une nouvelle instance de la SynchronizedCollection<T> classe à partir d’un tableau d’éléments spécifié 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.