c# byte to base64 encoded string code example
Example 1: convert to base64 c#
public static string Base64Encode(string plainText) {
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
return System.Convert.ToBase64String(plainTextBytes);
}
Example 2: byte array to base64 c#
byte[] temp_backToBytes = Convert.FromBase64String(temp_inBase64);