它似乎是一个罕见的问题,我无法保存文本文件的数据 strpath =“c:\ path \ 1234 \ abcd.txt”;无法保存c#中的文本文件数据
这里的文件正在创建,但文件中的数据没有被保存。
,如果我通过BYTE B长度检查是节目121
public int SaveFile(byte[] b,string lstrpath)
{
FileStream fs = new FileStream(strpath,FileMode.Create);
fs.Write(b,0,b.Length);
fs.Close();
if(File.Exists(strpath))
{
return 1;
}
else
{
return 0;
}
}
有什么,我错了吗?
那么*发生了什么?之后的文件是什么? – 2010-11-19 08:16:35