BinarySerializerTrySerializeValueArrayT Method

Tries to serialize an Array of ValueType elements into a byte array.
See the Remarks section of the SerializeValueArrayT(T) method for details.

Definition

Namespace: KGySoft.Serialization.Binary
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public static bool TrySerializeValueArray<T>(
	T[] array,
	out byte[] result
)
where T : struct, new()

Parameters

array  T
The array to serialize.
result  Byte
When this method returns, the byte array representation of the specified array. This parameter is passed uninitialized.

Type Parameters

T
Element type of the array. Must be a ValueType that has no references.

Return Value

Boolean
, if T contains no references and could be serialized; otherwise, .

See Also