ConcurrentBag<T>.IProducerConsumerCollection<T>.TryAdd(T) Método

Definición

Intenta agregar un objeto a 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

Parámetros

item
T

Objeto que se va a agregar a ConcurrentBag<T>. El valor puede ser una referencia nula (Nothing en Visual Basic) para los tipos de referencia.

Devoluciones

Siempre devuelve true.

Implementaciones

Se aplica a

Consulte también