C# 文件转Base64
using (FileStream filestream = new FileStream("LOGO.png", FileMode.Open))
{
byte[] bt = new byte[filestream.Length];
//调用read读取方法
filestream.Read(bt, 0, bt.Length);
var base64Str = Convert.ToBase64String(bt);
return base64Str;
}