Skip to main content

Convert an array of bytes to a string in C#.

using System.Text;

public byte[] ByteArrayToString(string str) {
  return new ASCIIEncoding().GetString(str);
}