EndianOrderCopyBytesT(T, Byte, Int32) Method

Copies the specified primitive type value as an array of bytes in the target endian-order to the destination array.

Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.190 -- Release Build+4f7f1aafd7d11323546b3aa1b5f0d7a271c76461
public int CopyBytes<T>(
	T value,
	byte[] destinationArray,
	int destinationIndex
)
where T : struct, new(), IConvertible

Parameters

value  T
The Boolean value to convert and copy.
destinationArray  Byte
The destination buffer.
destinationIndex  Int32
The byte offset into destinationArray.

Type Parameters

T
Native value type to get bytes for.

Return Value

Int32
Length of bytes copied into array based on size of T.

Exceptions

ArgumentExceptionvalue type is not primitive.
InvalidOperationExceptionCannot get bytes for value type.

See Also