Show / Hide Table of Contents

Class FastBitConverter

Inheritance
object
FastBitConverter
Namespace: LiteNetLib.Utils
Assembly: LiteNetLib.dll
Syntax
public static class FastBitConverter

Methods

GetBytes<T>(byte[], int, T)

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

Declaration
public static void GetBytes<T>(byte[] bytes, int startIndex, T value) where T : unmanaged
Parameters
Type Name Description
byte[] bytes

The destination byte array.

int startIndex

The zero-based index in bytes at which to begin writing.

T value

The value to be converted and written.

Type Parameters
Name Description
T

The type of the value to convert. Must be an unmanaged/blittable type.

Exceptions
Type Condition
IndexOutOfRangeException

Thrown when the bytes array is too small to contain the value at the given startIndex.

In this article
Back to top Generated by DocFX