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.
ConcurrentQueue<T>::IProducerConsumerCollection<T>::TryTake Method (T%)
.NET Framework (current version)
Attempts to remove and return an object from the System.Collections.Concurrent::IProducerConsumerCollection<T>.
Assembly: mscorlib (in mscorlib.dll)
private: virtual bool TryTake( [OutAttribute] T% item ) sealed = IProducerConsumerCollection<T>::TryTake
Parameters
- item
-
Type:
T%
When this method returns, if the operation was successful, item contains the object removed. If no object was available to be removed, the value is unspecified.
Return Value
Type: System::Booleantrue if an element was removed and returned succesfully; otherwise, false.
For ConcurrentQueue<T>, this operation will attempt to remove the object from the beginning of the ConcurrentQueue<T>.
Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Show: