使用文件流并设置标志将其直接写入磁盘而不是缓存
byte[] array = Encoding.ASCII.GetBytes("Eaxmple"
FileStream file=new FileStream("D:\\A.txt", FileMode.Create, FileAccess.ReadWrite, FileShare.None, 1024, FileOptions.WriteThrough);
file.Write(array, 0, array.Length);
file.Dispose();