Answers for "how to convert iformfile to byte array c#"

C#
0

how to convert iformfile to byte array c#

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
    }
  }
}
Posted by: Guest on May-27-2020

Code answers related to "how to convert iformfile to byte array c#"

C# Answers by Framework

Browse Popular Code Answers by Language