将字符串数组写入应用程序数据文件 [英] Writing Array of Strings to Application Data File

查看:94
本文介绍了将字符串数组写入应用程序数据文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力管理应用程序数据文件的最佳方法,并且希望您能提供任何指导.应用程序数据文件由100个记录组成,每个记录由两个字符串(字符串A和字符串B)组成.

I am struggling with the best way to manage an application data file and would appreciate any guidance you can give. The application data file consists of an array of 100 records, each record consists of two strings (string A and string B).

这就是我想做的.

1.当用户启动应用程序时,请检查该应用程序数据文件是否存在.

1. When the user starts the application, check to see if the app data file exists.

2.如果文件不存在,请创建它.

2. If the file does not exist, create it.

3.如果该文件确实存在,则将其打开以进行读取和写入.

3. If the file does exist, open it for reading and writing.

4.在应用程序运行时,用户将修改数组中的信息.

4. While the application is running the information in the array will be modified by the user.

5.当应用程序关闭时,修改后的数组将被保存.

5. When the application closes, the modified array will be saved.

再次,任何指导将不胜感激.

Again, any guidance would be much appreciated.


Thx,MikeH

Thx, MikeH

推荐答案

文件扩展名是否有任何要求?
Do you have any requirements for the file extension?


这篇关于将字符串数组写入应用程序数据文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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