This documentation is archived and is not being maintained.

BlockingCollection<T>.TryAdd Method

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method TryAdd(T) Tries to add the specified item to the BlockingCollection<T>.
Public method TryAdd(T, Int32) Tries to add the specified item to the BlockingCollection<T> within the specified time period.
Public method TryAdd(T, TimeSpan) Tries to add the specified item to the BlockingCollection<T>.
Public method TryAdd(T, Int32, CancellationToken) Tries to add the specified item to the BlockingCollection<T> within the specified time period, while observing a cancellation token.
Top
Show: