怎么把byte[] 写入文件?
如题
------解决方案--------------------byte[] data
FileStream fs = new FileStream( "D:\\NetPlayer\\Save File\\ "+fileName, FileMode.Create);
BinaryWriter sr = new BinaryWriter(fs);
sr.Write(data,0,data.Length);
sr.Close();
fs.Close();
------解决方案--------------------FileStream fs = new FileStream(@ "c:\temp\temp.txt ", FileMode.Append);
byte[] vBuffer = Encoding.Default.GetBytes( "Zswang ");
fs.Write(vBuffer, 0, vBuffer.Length);
fs.Close();
------解决方案--------------------FileStream.Write直接写