c# - create file and save to it using memorystream -
how can create file , write using memory stream? need use memorystream prevent other threads trying access file.
the data i'm trying save file html.
how can done?
(presuming mean how copy file's content memory stream)
if using framework 4:
memorystream memorystream = new memorystream(); using (filestream filestream = new filestream(filepath, filemode.open, fileaccess.read)) { filestream.copyto(memorystream); }
Comments
Post a Comment