我如何使用内存流而不是文件流 [英] How Do I Use Memory Stream Instead Of Filestream
问题描述
嗨朋友们,
我是asp.net的新手,我在网页上使用发送/接收邮件,我在使用时遇到了问题内存流而不是文件流,
Dim FS As MemoryStream = New MemoryStream(Server.MapPath(../ Temp /&filename),FileMode.Create)
错误:'String'类型的值无法转换为'字节的1维数组'
旧代码是:Dim FS As FileStream = New FileStream(Server.MapPath(../ Temp /&filename),FileMode.Create)
任何人请帮帮我
提前谢谢
Velsamy A
Hi friends ,
I am new to asp.net, here i am using using send/receive mail in my web page, i had a problem while using memory streaming instead of file streaming,
Dim FS As MemoryStream = New MemoryStream(Server.MapPath("../Temp/" & filename), FileMode.Create)
error : Value of type 'String' cannot be converted to '1-dimensional array of Byte'
old code is: Dim FS As FileStream = New FileStream (Server.MapPath("../Temp/" & filename), FileMode.Create)
any one please help me
thanks in advance
Velsamy A
推荐答案
请通过以下链接,这将有所帮助..
http://stackoverflow.com/questions/8624071/save-and-load-memorystream-to-from-a-file [ ^ ]
please go through following link, it will helpful..
http://stackoverflow.com/questions/8624071/save-and-load-memorystream-to-from-a-file[^]
这篇关于我如何使用内存流而不是文件流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!