Click or drag to resize

FastBitConverterGetBytesT Method

Converts a value of type T into a byte array starting at the specified index.

Namespace: LiteNetLib.Utils
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public static void GetBytes<T>(
	byte[] bytes,
	int startIndex,
	T value
)
where T : struct, new()

Parameters

bytes  Byte
The destination byte array.
startIndex  Int32
The zero-based index in bytes at which to begin writing.
value  T
The value to be converted and written.

Type Parameters

T
The type of the value to convert. Must be an unmanaged/blittable type.
Exceptions
ExceptionCondition
IndexOutOfRangeException Thrown when the bytes array is too small to contain the value at the given startIndex.
See Also