BitConverter.TryWriteBytes Método
Definição
Sobrecargas
| TryWriteBytes(Span<Byte>, Boolean) |
Converte um booliano em um intervalo de bytes.Converts a Boolean into a span of bytes. |
| TryWriteBytes(Span<Byte>, Char) |
Converte um caractere em um intervalo de bytes.Converts a character into a span of bytes. |
| TryWriteBytes(Span<Byte>, Double) |
Converte um valor de ponto flutuante de precisão dupla em um intervalo de bytes.Converts a double-precision floating-point value into a span of bytes. |
| TryWriteBytes(Span<Byte>, Int16) |
Converte um inteiro com sinal de 16 bits em um intervalo de bytes.Converts a 16-bit signed integer into a span of bytes. |
| TryWriteBytes(Span<Byte>, Int32) |
Converte um inteiro com sinal de 32 bits em um intervalo de bytes.Converts a 32-bit signed integer into a span of bytes. |
| TryWriteBytes(Span<Byte>, Int64) |
Converte um inteiro com sinal de 64 bits em um intervalo de bytes.Converts a 64-bit signed integer into a span of bytes. |
| TryWriteBytes(Span<Byte>, Single) |
Converte um valor de ponto flutuante de precisão dupla em um intervalo de bytes.Converts a double-precision floating-point value into a span of bytes. |
| TryWriteBytes(Span<Byte>, UInt16) |
Converte um inteiro sem sinal de 16 bits em um intervalo de bytes.Converts an unsigned 16-bit integer into a span of bytes. |
| TryWriteBytes(Span<Byte>, UInt32) |
Converte um inteiro sem sinal de 32 bits em um intervalo de bytes.Converts a 32-bit unsigned integer into a span of bytes. |
| TryWriteBytes(Span<Byte>, UInt64) |
Converte um inteiro sem sinal de 64 bits em um intervalo de bytes.Converts an unsigned 64-bit integer into a span of bytes. |
TryWriteBytes(Span<Byte>, Boolean)
Converte um booliano em um 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
Quando esse método é retornado, os bytes que representam o booliano convertido.When this method returns, the bytes representing the converted Boolean.
- value
- Boolean
O booliano a ser convertido.The Boolean to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
Aplica-se a
TryWriteBytes(Span<Byte>, Char)
Converte um caractere em um 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
Quando esse método é retornado, os bytes que representam o caractere convertido.When this method returns, the bytes representing the converted character.
- value
- Char
O caractere a ser convertido.The character to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
Aplica-se a
TryWriteBytes(Span<Byte>, Double)
Converte um valor de ponto flutuante de precisão dupla em um 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
Quando esse método é retornado, os bytes que representam o valor de ponto flutuante de precisão dupla convertido.When this method returns, the bytes representing the converted double-precision floating-point value.
- value
- Double
O valor do ponto flutuante de precisão dupla a ser convertido.The double-precision floating-point value to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
Aplica-se a
TryWriteBytes(Span<Byte>, Int16)
Converte um inteiro com sinal de 16 bits em um 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
Quando esse método é retornado, os bytes que representam o inteiro com sinal de 16 bits convertido.When this method returns, the bytes representing the converted 16-bit signed integer.
- value
- Int16
O inteiro assinado de 16 bits a ser convertido.The 16-bit signed integer to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
Aplica-se a
TryWriteBytes(Span<Byte>, Int32)
Converte um inteiro com sinal de 32 bits em um 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
Quando esse método é retornado, os bytes que representam o inteiro com sinal de 32 bits convertido.When this method returns, the bytes representing the converted 32-bit signed integer.
- value
- Int32
O inteiro com sinal de 32 bits a converter.The 32-bit signed integer to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
Aplica-se a
TryWriteBytes(Span<Byte>, Int64)
Converte um inteiro com sinal de 64 bits em um 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
Quando esse método é retornado, os bytes que representam o inteiro com sinal de 64 bits convertido.When this method returns, the bytes representing the converted 64-bit signed integer.
- value
- Int64
O inteiro com sinal de 64 bits a ser convertido.The 64-bit signed integer to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
Aplica-se a
TryWriteBytes(Span<Byte>, Single)
Converte um valor de ponto flutuante de precisão dupla em um 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
Quando esse método é retornado, os bytes que representam o valor de ponto flutuante de precisão dupla convertido.When this method returns, the bytes representing the converted double-precision floating-point value.
- value
- Single
O valor do ponto flutuante de precisão dupla a ser convertido.The double-precision floating-point value to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
Aplica-se a
TryWriteBytes(Span<Byte>, UInt16)
Importante
Esta API não está em conformidade com CLS.
Converte um inteiro sem sinal de 16 bits em um 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);
public static bool TryWriteBytes (Span<byte> destination, ushort value);
[<System.CLSCompliant(false)>]
static member TryWriteBytes : Span<byte> * uint16 -> bool
static member TryWriteBytes : Span<byte> * uint16 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As UShort) As Boolean
Parâmetros
Quando esse método é retornado, os bytes que representam o inteiro sem sinal de 16 bits convertido.When this method returns, the bytes representing the converted unsigned 16-bit integer.
- value
- UInt16
O inteiro sem sinal de 16 bits a ser convertido.The unsigned 16-bit integer to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
- Atributos
Aplica-se a
TryWriteBytes(Span<Byte>, UInt32)
Importante
Esta API não está em conformidade com CLS.
Converte um inteiro sem sinal de 32 bits em um 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);
public static bool TryWriteBytes (Span<byte> destination, uint value);
[<System.CLSCompliant(false)>]
static member TryWriteBytes : Span<byte> * uint32 -> bool
static member TryWriteBytes : Span<byte> * uint32 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As UInteger) As Boolean
Parâmetros
Quando esse método é retornado, os bytes que representam o inteiro sem sinal de 32 bits convertido.When this method returns, the bytes representing the converted unsigned 32-bit integer.
- value
- UInt32
O inteiro sem sinal de 32 bits a ser convertido.The unsigned 32-bit integer to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
- Atributos
Aplica-se a
TryWriteBytes(Span<Byte>, UInt64)
Importante
Esta API não está em conformidade com CLS.
Converte um inteiro sem sinal de 64 bits em um 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);
public static bool TryWriteBytes (Span<byte> destination, ulong value);
[<System.CLSCompliant(false)>]
static member TryWriteBytes : Span<byte> * uint64 -> bool
static member TryWriteBytes : Span<byte> * uint64 -> bool
Public Shared Function TryWriteBytes (destination As Span(Of Byte), value As ULong) As Boolean
Parâmetros
Quando esse método é retornado, os bytes que representam o inteiro sem sinal de 64 bits convertido.When this method returns, the bytes representing the converted unsigned 64-bit integer.
- value
- UInt64
O inteiro sem sinal de 64 bits a ser convertido.The unsigned 64-bit integer to convert.
Retornos
true se a conversão tiver sido bem-sucedida. Caso contrário, false.true if the conversion was successful; false otherwise.
- Atributos