且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

输入和输出流可以实现吗?

更新时间:2022-11-08 20:02:16

简单的方法是序列化.您可以使用二进制或XML.

我认为XML一个适合您.在MSDN上检查XmlSerializer.
The simples way will be serialization. You can use binary or XML one.

I think that XML one will be OK for you. Check XmlSerializer on MSDN.


您***对Double使用BinaryWriter读/写重载函数.

http://msdn.microsoft.com/en-us/library/ez8wcba9.aspx [ ^ ]

对于查找,只需获取索引并将其乘以双倍的大小即可得到正确的文件位置.
You could best use the BinaryWriter Read/Write overload functions for Double to do that.

http://msdn.microsoft.com/en-us/library/ez8wcba9.aspx[^]

For seeking you simply take the index and multiply it with the size of a double to get at the correct file position.
BinaryWriterObject.Seek(index * sizeof(double), SeekOrigin.Begin);



祝你好运!



Good luck!