本文介绍了何时使用ISerializable?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我正在创建的应用程序中使用二进制序列化进行文件存储。

现在,我正在使用带有[Serializable]属性的简单序列化。

现在,让我们说我创建了一个带有修改过的类结构的更高版本。我是

计划在我的课程上实现ISerializable和SerializationBinder

,以便能够阅读以前的版本文件。


是否可以推迟实施这些项目直到实际需要它们?

这是一个好主意吗?或者我最好从一开始就在我的所有课程中实现ISerializable吗?感谢您的建议。


Dave Veeneman

Foresight Systems,Inc。

I use binary serialization for file storage in an application I am creating.
Right now, I''m using simple serialization with a [Serializable] attribute.
Now, let''s say I create a later version with a modified class structure. I''m
planning to implement ISerializable and a SerializationBinder on my classes
at that time to enable reading prior version files.

Is it okay to defer implementing these items until they are actually needed?
Is it a good idea? Or would I be better off implementing ISerializable in
all my classes from the outset? Thanks for your advice.

Dave Veeneman
Foresight Systems, Inc.

推荐答案







Ahem ...没有不尊重的意志Nicholas,但那是'相当活跃的目标,

你不觉得吗?我的意思是,我们正在寻找不少于6个月的时间,并且很可能在我检查的Whidbey发布之前一年内接近
。它已经被推迟了2,3倍b?除非他们的开发计划很长,否则我不建议人们为Whidbey功能持有他们的

气息

term。


Pete



Ahem... No disrespect intendend Nicholas, but that''s quite a moving target,
don''t you think? I mean, we''re looking at no less than 6 months and likely
closer to a year before the release of Whidbey last I checked. It''s already
been delayed what, 2, 3 times? I just wouldn''t recommend people hold their
breath for Whidbey features unless their development plans are pretty long
term.

Pete


这篇关于何时使用ISerializable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 17:14