ConcurrentBag<T>.IProducerConsumerCollection<T>.TryAdd(T) Yöntem

Tanım

öğesine nesne eklemeye ConcurrentBag<T>çalışır.

 virtual bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryAdd(T item) = System::Collections::Concurrent::IProducerConsumerCollection<T>::TryAdd;
bool IProducerConsumerCollection<T>.TryAdd (T item);
abstract member System.Collections.Concurrent.IProducerConsumerCollection<T>.TryAdd : 'T -> bool
override this.System.Collections.Concurrent.IProducerConsumerCollection<T>.TryAdd : 'T -> bool
Function TryAdd (item As T) As Boolean Implements IProducerConsumerCollection(Of T).TryAdd

Parametreler

item
T

öğesine eklenecek ConcurrentBag<T>nesne. Değer, başvuru türleri için null başvuru (Visual Basic'te hiçbir şey) olabilir.

Döndürülenler

Her zaman true döndürür.

Uygulamalar

Şunlara uygulanır

Ayrıca bkz.