ConcurrentStack<T>.IProducerConsumerCollection<T>.TryTake Método

Definición

Intenta quitar y devolver un objeto de IProducerConsumerCollection<T>.

 virtual bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake([Runtime::InteropServices::Out] T % item) = System::Collections::Concurrent::IProducerConsumerCollection<T>::TryTake;
bool IProducerConsumerCollection<T>.TryTake (out T item);
abstract member System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake : 'T -> bool
override this.System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake : 'T -> bool
Function TryTake (ByRef item As T) As Boolean Implements IProducerConsumerCollection(Of T).TryTake

Parámetros

item
T

Cuando este método devuelve un valor, si la operación se realizó correctamente, item contiene el objeto que se ha quitado. Si no había ningún objeto para quitar, el valor estará sin especificar.

Devoluciones

true si el elemento se ha quitado y devuelto correctamente; de lo contrario, es false.

Implementaciones

Comentarios

Para ConcurrentStack<T>, esta operación intentará abrir el objeto en la parte superior de ConcurrentStack<T>.

Se aplica a

Consulte también