Encode a byte array in hexadecimal
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string ToHex(
this byte[] b
)
<ExtensionAttribute>
Public Shared Function ToHex (
b As Byte()
) As String
Parameters
- b Byte
- Input byte array
Return Value
StringHex-encoded string
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Byte. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Examplebyte[] b = { 0x00, 0x01, 0x02, 0x03 };
string s = b.ToHex();
See Also