convert byte array to string c# 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 utfString = Encoding.UTF8.GetString(bytes, 0, bytes.Length);