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를 반환합니다.

구현

적용 대상

추가 정보