您将为Windows Mobile设备应用程序建议哪种存储和检索方法? [英] What method of storage and retrieval for a Windows Mobile device application would you suggest?

查看:77
本文介绍了您将为Windows Mobile设备应用程序建议哪种存储和检索方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我目前正在制作Windows Mobile设备应用程序,我需要存储一些数据,然后在以后的某个时间点检索这些数据.

我要保存的数据包括1个日期,18个整数和1个浮点数.

我想您可以称呼它们的记录"数将被限制为156.(在此应用程序中,每周1次,共3年)

我一直在思考,以仅数据类型的形式或包含它们的类的对象/实例的形式保存这些记录"会更有效吗?

我考虑过将这些数据保存为XML,LIST(作为对象或数据类型)或数组等.但是说实话,我不知道哪种方法最有效.

在此先感谢您提供的任何建议.我并没有追求存储数据的最有效"方式,仅仅是一种被认为是合理"的方法,而不会造成设备上的速度减慢.

Senior Crispy

Hello all,

I am currently making a Windows Mobile device application and I need to store some data and then retrieve this data at a later point in time.

The data I am saving consists of 1 Date, 18 Integers and 1 Float.

The number of ''records'' I suppose you could call them, that will ever be saved will be limited to 156. (1 per week for 3 years, in this application)

I have been pondering would it be more efficient to save these ''records'', in the form of just the data types or as an object/instance of the class that contains them.

I have considered saving this data in XML, LIST(as the object or the data types) or an array, etc. But being honest I would not know which would work best.

Thanks in advance for any recommendations you guys can make. I''m not after the ''most'' efficient manner of storing this data, just a method that is considered to be ''reasonable'', but without to much of a slow down caused on the device.

Senior Crispy

推荐答案

您可以做的是通过将集合类标记为Serializable将数据序列化到磁盘.由于您不会使用太多数据,因此序列化/反序列化将不会花费很长时间,而且非常简单.只需将类写到隔离的存储中,然后完成工作即可.
What you could do is serialize the data to disk by marking your collection class as Serializable. As you aren''t using too much data, the serialization/deserialization will not take very long and is very simple. Just write the class out to isolated storage, and job done.


这篇关于您将为Windows Mobile设备应用程序建议哪种存储和检索方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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