Convert.FromHexString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
FromHexString(ReadOnlySpan<Char>) |
Converts the span, which encodes binary data as hex characters, to an equivalent 8-bit unsigned integer array. |
FromHexString(String) |
Converts the specified string, which encodes binary data as hex characters, to an equivalent 8-bit unsigned integer array. |
FromHexString(ReadOnlySpan<Char>, Span<Byte>, Int32, Int32) | |
FromHexString(String, Span<Byte>, Int32, Int32) |
FromHexString(ReadOnlySpan<Char>)
- Source:
- Convert.cs
- Source:
- Convert.cs
- Source:
- Convert.cs
Converts the span, which encodes binary data as hex characters, to an equivalent 8-bit unsigned integer array.
public:
static cli::array <System::Byte> ^ FromHexString(ReadOnlySpan<char> chars);
public static byte[] FromHexString (ReadOnlySpan<char> chars);
static member FromHexString : ReadOnlySpan<char> -> byte[]
Public Shared Function FromHexString (chars As ReadOnlySpan(Of Char)) As Byte()
Parameters
- chars
- ReadOnlySpan<Char>
The span to convert.
Returns
An array of 8-bit unsigned integers that is equivalent to chars
.
Exceptions
The length of chars
, is not zero or a multiple of 2.
The format of chars
is invalid. chars
contains a non-hex character.
Applies to
FromHexString(String)
- Source:
- Convert.cs
- Source:
- Convert.cs
- Source:
- Convert.cs
Converts the specified string, which encodes binary data as hex characters, to an equivalent 8-bit unsigned integer array.
public:
static cli::array <System::Byte> ^ FromHexString(System::String ^ s);
public static byte[] FromHexString (string s);
static member FromHexString : string -> byte[]
Public Shared Function FromHexString (s As String) As Byte()
Parameters
- s
- String
The string to convert.
Returns
An array of 8-bit unsigned integers that is equivalent to s
.
Exceptions
s
is null
.
The length of s
, is not zero or a multiple of 2.
The format of s
is invalid. s
contains a non-hex character.
Applies to
FromHexString(ReadOnlySpan<Char>, Span<Byte>, Int32, Int32)
- Source:
- Convert.cs
public:
static System::Buffers::OperationStatus FromHexString(ReadOnlySpan<char> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % charsConsumed, [Runtime::InteropServices::Out] int % bytesWritten);
public static System.Buffers.OperationStatus FromHexString (ReadOnlySpan<char> source, Span<byte> destination, out int charsConsumed, out int bytesWritten);
static member FromHexString : ReadOnlySpan<char> * Span<byte> * int * int -> System.Buffers.OperationStatus
Public Shared Function FromHexString (source As ReadOnlySpan(Of Char), destination As Span(Of Byte), ByRef charsConsumed As Integer, ByRef bytesWritten As Integer) As OperationStatus
Parameters
- source
- ReadOnlySpan<Char>
- charsConsumed
- Int32
- bytesWritten
- Int32
Returns
Applies to
FromHexString(String, Span<Byte>, Int32, Int32)
- Source:
- Convert.cs
public:
static System::Buffers::OperationStatus FromHexString(System::String ^ source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % charsConsumed, [Runtime::InteropServices::Out] int % bytesWritten);
public static System.Buffers.OperationStatus FromHexString (string source, Span<byte> destination, out int charsConsumed, out int bytesWritten);
static member FromHexString : string * Span<byte> * int * int -> System.Buffers.OperationStatus
Public Shared Function FromHexString (source As String, destination As Span(Of Byte), ByRef charsConsumed As Integer, ByRef bytesWritten As Integer) As OperationStatus
Parameters
- source
- String
- charsConsumed
- Int32
- bytesWritten
- Int32
Returns
Applies to
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin