PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Formatters Namespace / Char­Span Structure / Char­Span Methods / Char­Span.​To­Char­Array­Segment Method

CharSpan.ToCharArraySegment Method

Converts the current CharSpan into an ArraySegment<T> of Char. When the IsBackedByCharArray or IsNull property is true, this method does not allocate memory.

Namespace:  PostSharp.Patterns.Formatters
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
public ArraySegment<char> ToCharArraySegment()

Return Value

Type: ArraySegment<Char>
See Also