Table of Contents

Method Write

Namespace
Zyl.ExSpans
Assembly
ExSpans.Core.dll

Write<T>(ExSpan<byte>, in T)

Writes a structure of type T into a span of bytes (将 T 类型的结构体写入字节跨度内).

public static void Write<T>(ExSpan<byte> destination, in T value) where T : struct

Parameters

destination ExSpan<byte>

The destination span (目标跨度).

value T

The structure to be written to the span (要写入到范围的结构体).

Type Parameters

T

The element type (元素的类型).

Exceptions

ArgumentException

T contains managed object references.

ArgumentOutOfRangeException

destination is too small to contain value.