ConcurrentBag<T>.IProducerConsumerCollection<T>.TryAdd(T) メソッド

定義

ConcurrentBag<T>にオブジェクトを追加しようとします。

 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

パラメーター

item
T

ConcurrentBag<T>に追加するオブジェクト。 値には、参照型の null 参照 (Visual Basicでは Nothing) を指定できます。

返品

常に true を返します。

実装

適用対象

こちらもご覧ください