Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BlockingCollection<T>::TryTake Method

.NET Framework (current version)
 

Tries to remove an item from the BlockingCollection<T>.

Namespace:   System.Collections.Concurrent
Assembly:  System (in System.dll)

NameDescription
System_CAPS_pubmethodTryTake(T%)

Tries to remove an item from the BlockingCollection<T>.

System_CAPS_pubmethodTryTake(T%, Int32)

Tries to remove an item from the BlockingCollection<T> in the specified time period.

System_CAPS_pubmethodTryTake(T%, Int32, CancellationToken)

Tries to remove an item from the BlockingCollection<T> in the specified time period while observing a cancellation token.

System_CAPS_pubmethodTryTake(T%, TimeSpan)

Tries to remove an item from the BlockingCollection<T> in the specified time period.

The following example shows how to use the TryTake method.

No code example is currently available or this language may not be supported.
Return to top
Show:
© 2017 Microsoft