BitConverter.TryWriteBytes Método

Definición

Sobrecargas

TryWriteBytes(Span<Byte>, Boolean)

Convierte un valor booleano en un intervalo de bytes.Converts a Boolean into a span of bytes.

TryWriteBytes(Span<Byte>, Char)

Convierte un carácter en un intervalo de bytes.Converts a character into a span of bytes.

TryWriteBytes(Span<Byte>, Double)

Convierte un valor de punto flotante de precisión doble en un intervalo de bytes.Converts a double-precision floating-point value into a span of bytes.

TryWriteBytes(Span<Byte>, Int16)

Convierte un entero de 16 bits con signo en un intervalo de bytes.Converts a 16-bit signed integer into a span of bytes.

TryWriteBytes(Span<Byte>, Int32)

Convierte un entero de 32 bits con signo en un intervalo de bytes.Converts a 32-bit signed integer into a span of bytes.

TryWriteBytes(Span<Byte>, Int64)

Convierte un entero de 64 bits con signo en un intervalo de bytes.Converts a 64-bit signed integer into a span of bytes.

TryWriteBytes(Span<Byte>, Single)

Convierte un valor de punto flotante de precisión doble en un intervalo de bytes.Converts a double-precision floating-point value into a span of bytes.

TryWriteBytes(Span<Byte>, UInt16)

Convierte un entero de 16 bits sin signo en un intervalo de bytes.Converts an unsigned 16-bit integer into a span of bytes.

TryWriteBytes(Span<Byte>, UInt32)

Convierte un entero de 32 bits sin signo en un intervalo de bytes.Converts a 32-bit unsigned integer into a span of bytes.

TryWriteBytes(Span<Byte>, UInt64)

Convierte un entero de 64 bits sin signo en un intervalo de bytes.Converts an unsigned 64-bit integer into a span of bytes.

TryWriteBytes(Span<Byte>, Boolean)

Convierte un valor booleano en un intervalo de bytes.Converts a Boolean into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, bool value);
public static bool TryWriteBytes (Span<byte> destination, bool value);
static member TryWriteBytes : Span<byte> * bool -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As Boolean) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el valor booleano convertido.When this method returns, the bytes representing the converted Boolean.

value
Boolean

Valor booleano que se va a convertir.The Boolean to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

TryWriteBytes(Span<Byte>, Char)

Convierte un carácter en un intervalo de bytes.Converts a character into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, char value);
public static bool TryWriteBytes (Span<byte> destination, char value);
static member TryWriteBytes : Span<byte> * char -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As Char) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el carácter convertido.When this method returns, the bytes representing the converted character.

value
Char

Carácter que se va a convertir.The character to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

TryWriteBytes(Span<Byte>, Double)

Convierte un valor de punto flotante de precisión doble en un intervalo de bytes.Converts a double-precision floating-point value into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, double value);
public static bool TryWriteBytes (Span<byte> destination, double value);
static member TryWriteBytes : Span<byte> * double -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As Double) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el valor de punto flotante de doble precisión convertido.When this method returns, the bytes representing the converted double-precision floating-point value.

value
Double

Valor de punto flotante de precisión doble que se va a convertir.The double-precision floating-point value to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

TryWriteBytes(Span<Byte>, Int16)

Convierte un entero de 16 bits con signo en un intervalo de bytes.Converts a 16-bit signed integer into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, short value);
public static bool TryWriteBytes (Span<byte> destination, short value);
static member TryWriteBytes : Span<byte> * int16 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As Short) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el entero de 16 bits con signo convertido.When this method returns, the bytes representing the converted 16-bit signed integer.

value
Int16

Entero de 16 bits con signo que se va a convertir.The 16-bit signed integer to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

TryWriteBytes(Span<Byte>, Int32)

Convierte un entero de 32 bits con signo en un intervalo de bytes.Converts a 32-bit signed integer into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, int value);
public static bool TryWriteBytes (Span<byte> destination, int value);
static member TryWriteBytes : Span<byte> * int -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As Integer) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el entero de 32 bits con signo convertido.When this method returns, the bytes representing the converted 32-bit signed integer.

value
Int32

Entero de 32 bits con signo que se va a convertir.The 32-bit signed integer to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

TryWriteBytes(Span<Byte>, Int64)

Convierte un entero de 64 bits con signo en un intervalo de bytes.Converts a 64-bit signed integer into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, long value);
public static bool TryWriteBytes (Span<byte> destination, long value);
static member TryWriteBytes : Span<byte> * int64 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As Long) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el entero de 64 bits con signo convertido.When this method returns, the bytes representing the converted 64-bit signed integer.

value
Int64

Entero de 64 bits con signo que se va a convertir.The 64-bit signed integer to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

TryWriteBytes(Span<Byte>, Single)

Convierte un valor de punto flotante de precisión doble en un intervalo de bytes.Converts a double-precision floating-point value into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, float value);
public static bool TryWriteBytes (Span<byte> destination, float value);
static member TryWriteBytes : Span<byte> * single -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As Single) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el valor de punto flotante de doble precisión convertido.When this method returns, the bytes representing the converted double-precision floating-point value.

value
Single

Valor de punto flotante de precisión doble que se va a convertir.The double-precision floating-point value to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

TryWriteBytes(Span<Byte>, UInt16)

Importante

Esta API no es conforme a CLS.

Convierte un entero de 16 bits sin signo en un intervalo de bytes.Converts an unsigned 16-bit integer into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, System::UInt16 value);
[System.CLSCompliant(false)]
public static bool TryWriteBytes (Span<byte> destination, ushort value);
static member TryWriteBytes : Span<byte> * uint16 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As UShort) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el entero de 16 bits sin signo convertido.When this method returns, the bytes representing the converted unsigned 16-bit integer.

value
UInt16

Entero de 16 bits sin signo que se va a convertir.The unsigned 16-bit integer to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

Atributos

TryWriteBytes(Span<Byte>, UInt32)

Importante

Esta API no es conforme a CLS.

Convierte un entero de 32 bits sin signo en un intervalo de bytes.Converts a 32-bit unsigned integer into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, System::UInt32 value);
[System.CLSCompliant(false)]
public static bool TryWriteBytes (Span<byte> destination, uint value);
static member TryWriteBytes : Span<byte> * uint32 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As UInteger) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el entero de 32 bits sin signo convertido.When this method returns, the bytes representing the converted unsigned 32-bit integer.

value
UInt32

Entero de 32 bits sin signo que se va a convertir.The unsigned 32-bit integer to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

Atributos

TryWriteBytes(Span<Byte>, UInt64)

Importante

Esta API no es conforme a CLS.

Convierte un entero de 64 bits sin signo en un intervalo de bytes.Converts an unsigned 64-bit integer into a span of bytes.

public:
 static bool TryWriteBytes(Span<System::Byte> destination, System::UInt64 value);
[System.CLSCompliant(false)]
public static bool TryWriteBytes (Span<byte> destination, ulong value);
static member TryWriteBytes : Span<byte> * uint64 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As ULong) As Boolean

Parámetros

destination
Span<Byte>

Cuando se devuelve este método, bytes que representan el entero de 64 bits sin signo convertido.When this method returns, the bytes representing the converted unsigned 64-bit integer.

value
UInt64

Entero de 64 bits sin signo que se va a convertir.The unsigned 64-bit integer to convert.

Devoluciones

true si la conversión se realizó correctamente; en caso contrario, false.true if the conversion was successful; false otherwise.

Atributos

Se aplica a