DataContractSerializer——如何确保序列化数据的格式正确?
我大量使用 DataContractSerializer 在我的应用程序中存储项目。当我想打开以前保存的文件时,如何在开始反序列化之前确保文件的完整性和/或结构?有没有可以提供版本号之类的东西?或者也许是注释属性?谢谢!
I heavily use a DataContractSerializer to store projects within my application. When I want to open a previously saved file, how can I ensure the integrity and/or structure of the file before I start deserializing it? Is there something like a version id which one can provide? Or maybe a annotation property? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论