SequenceMarshal.TryGetArray<T>(ReadOnlySequence<T>, ArraySegment<T>) Método

Definição

Obtém um segmento de matriz da sequência somente leitura subjacente.Gets an array segment from the underlying read-only sequence.

public:
generic <typename T>
 static bool TryGetArray(System::Buffers::ReadOnlySequence<T> sequence, [Runtime::InteropServices::Out] ArraySegment<T> % segment);
public static bool TryGetArray<T> (System.Buffers.ReadOnlySequence<T> sequence, out ArraySegment<T> segment);
static member TryGetArray : System.Buffers.ReadOnlySequence<'T> * ArraySegment -> bool
Public Shared Function TryGetArray(Of T) (sequence As ReadOnlySequence(Of T), ByRef segment As ArraySegment(Of T)) As Boolean

Parâmetros de tipo

T

O tipo da sequência somente leitura.The type of the read-only sequence.

Parâmetros

sequence
ReadOnlySequence<T>

A sequência somente leitura da qual o segmento de matriz será recuperado.The read-only sequence from which the array segment will be retrieved.

segment
ArraySegment<T>

O segmento de matriz retornado.The returned array segment.

Retornos

Boolean

true se é possível recuperar o segmento de matriz; caso contrário, false e um segmento de matriz padrão é retornado.true if it's possible to retrieve the array segment; otherwise, false and a default array segment is returned.

Aplica-se a