METHOD
Convert.FromHexString
Decodes a hexadecimal string into bytes. The string overload rejects odd length and nonhexadecimal characters with FormatException. Validate expected length before allocation for a bounded digest contract. A digest does not authenticate its issuer.
Formal Syntax & Structure
csharp syntaxcsharp
Convert.FromHexString(text)Working Example
Example Snippetcsharp
using System;using System.Collections.Generic;using System.Runtime.InteropServices;Console.WriteLine(Convert.FromHexString("00FF")[1]); // 255