Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# convert iformfile to stream

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
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: difference between executescalar and executenonquery and executereader 
Csharp :: ggdesign 
Csharp :: c# dictionary first 
Csharp :: c# how to use inovke 
Csharp :: perlin noise unity 
Csharp :: mvc list to jsonresult 
Csharp :: how to cjeck if a string has a word c# 
Csharp :: programmatically write bash script from c# 
Csharp :: c# hex to console color 
Csharp :: c# convert string to int 
Csharp :: mathf.clamp unity 
Csharp :: varibles c# 
Csharp :: new color unity 
Csharp :: unity look at target 
Csharp :: jarray to list c# 
Csharp :: c# get user appdata folder 
Csharp :: c# shuffle list 
Csharp :: all month in array 
Csharp :: how to make an object appear and disappear in unity 
Csharp :: c# get enum value from string 
Csharp :: c# substring from end 
Csharp :: c# run loop x times 
Csharp :: listview item click c# 
Csharp :: unity how to get the side ways velocity of a object 
Csharp :: c# get command line arguments 
Csharp :: dotnet build command 
Csharp :: how delete multiple row from relation in laravel 
Csharp :: unity icons 
Csharp :: c# move files from one directory to another 
Csharp :: unity post processing ui 2d 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =