Convert from byte array to string hex c#

arrays, byte, c#, string

Solution

use bitconverter class

 BitConverter.ToString(Bytes);

Problem

Suppose I have byte array. ``` byte[] a = new byte[] {0x33,0x43,0xFE}; ``` I want to convert it to `string`. ``` string str = convert(a); ``` My str should look like this: ``` "33 43 FE" ``` How can I do that?

Original source

Related problems