FastBitConverterGetBytesT Method |
Converts a value of type T into a byte array starting at the specified index.
Namespace: LiteNetLib.UtilsAssembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntaxpublic 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| Exception | Condition |
|---|
| IndexOutOfRangeException |
Thrown when the bytes array is too small to contain the value at the given startIndex.
|
See Also