Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ArrayBufferWriter<T> Class
Definition
- Namespace:
- System.Buffers
- Assemblies:
- netstandard.dll, System.Memory.dll
- Assembly:
- System.Memory.dll
- Assembly:
- netstandard.dll
- Source:
- ArrayBufferWriter.cs
- Source:
- ArrayBufferWriter.cs
- Source:
- ArrayBufferWriter.cs
- Source:
- ArrayBufferWriter.cs
- Source:
- ArrayBufferWriter.cs
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.
Represents a heap-based, array-backed output sink into which T data can be written.
generic <typename T>
public ref class ArrayBufferWriter sealed : System::Buffers::IBufferWriter<T>
public sealed class ArrayBufferWriter<T> : System.Buffers.IBufferWriter<T>
type ArrayBufferWriter<'T> = class
interface IBufferWriter<'T>
Public NotInheritable Class ArrayBufferWriter(Of T)
Implements IBufferWriter(Of T)
Type Parameters
- T
The type of the items in this ArrayBufferWriter<T> instance.
- Inheritance
-
ArrayBufferWriter<T>
- Implements
Constructors
| Name | Description |
|---|---|
| ArrayBufferWriter<T>() |
Creates an instance of an ArrayBufferWriter<T> to which data can be written, with the default initial capacity. |
| ArrayBufferWriter<T>(Int32) |
Creates an instance of an ArrayBufferWriter<T> to which data can be written, with a specified initial capacity. |
Properties
| Name | Description |
|---|---|
| Capacity |
Gets the total amount of space within the underlying buffer. |
| FreeCapacity |
Gets the amount of available space that can be written to without forcing the underlying buffer to grow. |
| WrittenCount |
Gets the amount of data written to the underlying buffer. |
| WrittenMemory |
Gets a ReadOnlyMemory<T> that contains the data written to the underlying buffer so far. |
| WrittenSpan |
Gets a ReadOnlySpan<T> that contains the data written to the underlying buffer so far. |
Methods
| Name | Description |
|---|---|
| Advance(Int32) |
Notifies the IBufferWriter<T> that |
| Clear() |
Clears the data written to the underlying buffer. |
| Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
| GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
| GetMemory(Int32) |
Returns a Memory<T> to write to that is at least the length specified by |
| GetSpan(Int32) |
Returns a Span<T> to write to that is at least a specified length. |
| GetType() |
Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
| ResetWrittenCount() |
Resets the data written to the underlying buffer without zeroing its content. |
| ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Extension Methods
| Name | Description |
|---|---|
| Write<T>(IBufferWriter<T>, ReadOnlySpan<T>) |
Writes the contents of |
Applies to
Feedback
Was this page helpful?
