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>)
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
- Byte[]
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)
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
- Byte[]
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.