C# 数组快速读取和写入

摘要:

C# 数组快速读取和写入

1 BinaryFormatter binaryFormatter = new BinaryFormatter();
2 FileStream fileStream = new FileStream(@"E:\context.txt", FileMode.Create);
3 binaryFormatter.Serialize(fileStream, a);
4 fileStream.Dispose();
5 
6 FileStream s = new FileStream(@"E:\context.txt", FileMode.Open);
7 float[,] b = (float[,])(binaryFormatter.Deserialize(s));

 

posted on 2017-03-21 18:33  小圈子  阅读(1610)  评论(0编辑  收藏  举报

导航