📜  c# 图像到字节数组 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:59.995000             🧑  作者: Mango

代码示例2
foreach (var file in files)
{
  if (file.Length > 0)
  {
    using (var ms = new MemoryStream())
    {
      file.CopyTo(ms);
      var fileBytes = ms.ToArray();
      string s = Convert.ToBase64String(fileBytes);
      // act on the Base64 data
    }
  }
}