BlockingCollection<T>.TryAdd Method

Tries to add the specified item to the BlockingCollection<T>.

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

  Name Description
Public method Supported by Portable Class Library TryAdd(T) Tries to add the specified item to the BlockingCollection<T>.
Public method Supported by Portable Class Library TryAdd(T, Int32) Tries to add the specified item to the BlockingCollection<T> within the specified time period.
Public method Supported by Portable Class Library TryAdd(T, TimeSpan) Tries to add the specified item to the BlockingCollection<T>.
Public method Supported by Portable Class Library 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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft