BitConverterNTryWriteBytesTNumeric Method
Converts a numeric value into a span of bytes.
Namespace: Jodosoft.NumericsAssembly: 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>
Public Shared Function TryWriteBytes(Of TNumeric As {Structure, New, INumeric(Of TNumeric)}) (
destination As Span(Of Byte),
value As TNumeric
) As Boolean
public:
generic<typename TNumeric>
where TNumeric : value class, gcnew(), INumeric<TNumeric>
static bool TryWriteBytes(
Span<unsigned char> destination,
TNumeric value
)
static member TryWriteBytes :
destination : Span<byte> *
value : 'TNumeric -> bool when 'TNumeric : struct, new() and INumeric<'TNumeric>
- destination SpanByte
- When this method returns, the bytes representing the converted numeric value.
- value TNumeric
- The numeric value to convert.
- TNumeric
Boolean if the conversion was successful;
otherwise.