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
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.