IBufferWriter<T>.GetSpan(Int32) 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.
Returns a Span<T> to write to that is at least the requested size (specified by sizeHint
).
public Span<T> GetSpan (int sizeHint = 0);
abstract member GetSpan : int -> Span<'T>
Public Function GetSpan (Optional sizeHint As Integer = 0) As Span(Of T)
Parameters
Returns
A Span<T> of at least the size sizeHint
. If sizeHint
is 0, returns a non-empty buffer.
Remarks
There is no guarantee that successive calls will return the same buffer or the same-sized buffer.
This method must never return Span<T>.Empty, but it can throw if the requested buffer size is not available.
You must request a new buffer after calling Advance
to continue writing more data; you cannot write to a previously acquired buffer.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기