IProducerConsumerCollection<T>::TryTake Method (T%)

.NET Framework (current version)
 

Attempts to remove and return an object from the IProducerConsumerCollection<T>.

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

bool TryTake(
	[OutAttribute] T% item
)

Parameters

item
Type: T%

When this method returns, if the object was removed and returned successfully, item contains the removed object. If no object was available to be removed, the value is unspecified.

Return Value

Type: System::Boolean

true if an object was removed and returned successfully; otherwise, false.

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
Return to top
Show: