c# process how to write byte array as string code example
Example 1: c# store byte array as string
public static void Main()
{
byte[] bytes = Convert.FromBase64String("QUJDMTIz");
Console.WriteLine("Byte Array is: " + String.Join(" ", bytes));
string str = Convert.ToBase64String(bytes);
Console.WriteLine("The String is: " + str);
}
Example 2: c# store byte array as string
string bitString = BitConverter.ToString(bytes);