BitConverterNTryWriteBytesTNumeric Method

Converts a numeric value into a span of bytes.

Definition

Namespace: Jodosoft.Numerics
Assembly: Jodosoft.Numerics (in Jodosoft.Numerics.dll) Version: 2.0
public static bool TryWriteBytes<TNumeric>(
	Span<byte> destination,
	TNumeric value
)
where TNumeric : struct, new(), INumeric<TNumeric>

Parameters

destination  SpanByte
When this method returns, the bytes representing the converted numeric value.
value  TNumeric
The numeric value to convert.

Type Parameters

TNumeric

Return Value

Boolean
if the conversion was successful; otherwise.

See Also