SequenceMarshal.TryGetArray<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Type Parameters
- T
The type of the read-only sequence.
Parameters
- sequence
- ReadOnlySequence<T>
The read-only sequence from which the array segment will be retrieved.
- segment
- ArraySegment<T>
The returned array segment.
Returns
true
if it's possible to retrieve the array segment; otherwise, false
and a default array segment is returned.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για