BigInteger.TryWriteBytes(Span<Byte>, Int32, Boolean, Boolean) Método

Definición

Copia el valor de este objeto BigInteger como bytes de complemento a dos little endian usando el menor número de bytes posible.Copies the value of this BigInteger as little-endian twos-complement bytes, using the fewest number of bytes possible. Si el valor es cero, se genera un byte cuyo elemento es 0x00.If the value is zero, outputs one byte whose element is 0x00.

public bool TryWriteBytes (Span<byte> destination, out int bytesWritten, bool isUnsigned = false, bool isBigEndian = false);
member this.TryWriteBytes : Span<byte> * int * bool * bool -> bool
Public Function TryWriteBytes (destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional isUnsigned As Boolean = false, Optional isBigEndian As Boolean = false) As Boolean

Parámetros

destination
Span<Byte>

Intervalo de destino en el que se deben escribir los bytes resultantes.The destination span to which the resulting bytes should be written.

bytesWritten
Int32

Número de bytes escritos en destination.The number of bytes written to destination.

isUnsigned
Boolean

true para usar la codificación sin signo; de lo contrario, false.true to use unsigned encoding; otherwise, false.

isBigEndian
Boolean

true para escribir los bytes en un orden de bytes big endian; de lo contrario, false.true to write the bytes in a big-endian byte order; otherwise, false.

Devoluciones

true si los bytes caben en destination; false si no se pueden escribir todos los bytes debido a la falta de espacio.true if the bytes fit in destination; false if not all bytes could be written due to lack of space.

Excepciones

isUnsigned es true y Sign es negativo.isUnsigned is true and Sign is negative.

Se aplica a