ConcurrentBag<T>.TryTake(T) Metoda

Definice

Pokusí se odebrat a vrátit objekt z objektu ConcurrentBag<T>.

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

Parametry

result
T

Když se tato metoda vrátí, result obsahuje objekt odebraný z ConcurrentBag<T> výchozí hodnoty nebo pokud T je taška prázdná.

Návraty

truepokud byl objekt úspěšně odebrán; v opačném případě . false

Implementuje

Platí pro

Viz také