IProducerConsumerCollection<T>.TryTake(T) Método

Definição

Tenta remover e retornar um objeto do IProducerConsumerCollection<T>.Attempts to remove and return an object from the IProducerConsumerCollection<T>.

public:
 bool TryTake([Runtime::InteropServices::Out] T % item);
public bool TryTake (out T item);
abstract member TryTake : 'T -> bool
Public Function TryTake (ByRef item As T) As Boolean

Parâmetros

item
T

Quando este método retorna, se o objeto foi removido e retornou com êxito, item contém o objeto removido.When this method returns, if the object was removed and returned successfully, item contains the removed object. Caso nenhum objeto esteja disponível para ser removido, o valor é não especificado.If no object was available to be removed, the value is unspecified.

Retornos

Boolean

true se um objeto tiver sido removido e tiver retornado com êxito; caso contrário, false.true if an object was removed and returned successfully; otherwise, false.

Aplica-se a