Queue<T>.TryPeek(T) Método

Definição

Retorna um valor que indica se há um objeto no início do Queue<T> e se um está presente, copia-o para o result parâmetro.Returns a value that indicates whether there is an object at the beginning of the Queue<T>, and if one is present, copies it to the result parameter. O objeto não é removido do Queue<T>.The object is not removed from the Queue<T>.

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

Parâmetros

result
T

Se estiver presente, o objeto no início do Queue<T> ; caso contrário, o valor padrão de T .If present, the object at the beginning of the Queue<T>; otherwise, the default value of T.

Retornos

Boolean

true Se houver um objeto no início do Queue<T> ; false se o Queue<T> estiver vazio.true if there is an object at the beginning of the Queue<T>; false if the Queue<T> is empty.

Aplica-se a