Published
- 1 min read
convert to base64 c#
The solution for this is noted below
convert to base64 c#
Solution
public static string Base64Encode(string plainText) {
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
return System.Convert.ToBase64String(plainTextBytes);
}
Try other methods by searching on the site. That is if this doesn’t work