[代码片断]创建或写文件
string filename = "c:\\a.txt";
string content = "hello world!~";
byte[] data = Encoding.Unicode.GetBytes( content );
using( FileStream fs = new FileStream( filename, FileMode.Append ) ) {
//开始写入
fs.Write( data, 0, data.Length );
//清空缓冲区、关闭流
fs.Flush();
fs.Close();
}