更新二进制文件 [英] updating binary file

查看:129
本文介绍了更新二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须用vb.net中的新信息更新二进制文件.
我正在使用二进制读取器,写入器和文件流.
我该怎么做,我的二进制文件包含5条记录,我想用new更新第一条记录信息.我现在可以读取记录信息,如何用new更新.

请咨询.

i have to update a binary file with new information in vb.net.
i am using binary reader,writer and filestream.
how do i do that my binary file contains 5 records and i want to update first record information with the new.i can read the record information now how to update with the new.

please advice.

推荐答案

要修改文件的现有内容,您必须:
  • 读取内存中的文件内容.
  • 修改内存内容.
  • 将修改后的内存内容写入原始文件.
In order to modify file existing content you have to:
  • Read the file content in memory.
  • Modify memory content.
  • Write modified memory content to the original file.


这篇关于更新二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆