惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

SecWiki News
SecWiki News
Microsoft Azure Blog
Microsoft Azure Blog
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
博客园_首页
月光博客
月光博客
N
News | PayPal Newsroom
The Cloudflare Blog
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
量子位
G
Google Developers Blog
T
Troy Hunt's Blog
博客园 - Franky
腾讯CDC
S
Security Affairs
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
S
Security @ Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
D
DataBreaches.Net
Recorded Future
Recorded Future
H
Heimdal Security Blog
V
Vulnerabilities – Threatpost
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
D
Docker
P
Proofpoint News Feed
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
Secure Thoughts
Engineering at Meta
Engineering at Meta
PCI Perspectives
PCI Perspectives
宝玉的分享
宝玉的分享
The Hacker News
The Hacker News
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cloudbric
Cloudbric
Microsoft Security Blog
Microsoft Security Blog
G
GRAHAM CLULEY
MyScale Blog
MyScale Blog
L
LINUX DO - 热门话题
雷峰网
雷峰网
Know Your Adversary
Know Your Adversary

博客园 - zsi

在线程中调用SaveFileDialog DSOFramer 之一:在 64 位系统注册 DSOFramer GridView 绑定数据不满一页时填充空行的方法 GridView 始终显示 Pager 分页行的一种方法 Chrome: Google加入浏览器大战之兼容性 调用unrar.dll时SEHException外部组件异常的处理 ASP.NET 2.0无法打开到 SQL Server 的连接 扯扯OpenFileDialog和.NET的缺省目录 给ASP.NET程序换换地儿 对象序列化:使用XmlSerializer走完最后一步 对象序列化:使用System.Xml.Serialization命名空间 在.NET中实现对象序列化 了解HTTP协议一些有用资料 Yahoo!十岁! 在VB.NET中处理构造函数时值得注意的两个陈述 微软新发布的共享设计模式的WIKI 还不快进入Design Pattern的世界? 另人费解的IsNot关键字 也说金山词霸2005内存泄露的问题
对象序列化:经验小结
zsi · 2005-04-20 · via 博客园 - zsi

.NET的对象序列化真是好东西,以后要多多利用。

  在使用.NET的序列化时,碰到过一些问题,还好,有丰富的MSDN可查,没有什么过不去的槛。在这里,把使用.NET序列化的经验小结一下。
  1. 基本确认XmlSerializer使用UTF8对序列化的XML文档编码。
  2. XmlSerializer只序列化声明为public的字段,属性,或带返回值的方法。
  3. 如果要序列化属性,那么该属性必须是可读写的,即必须包含get和set,而不能是readonly或writeonly。
  4. XmlAttribute,XmlAnyAttribute不能与XmlElement,XmlText,XmlAnyElement,XmlArray,XmlArrayItem一起使用。
  5. XmlRoot只能用于一个类,XmlType可用于所有类。
  6. 不同的类的XmlType不能相同,除非使用NameSpaces区分。

相关链接:
  ●

在.NET中实现对象序列化
  ● 对象序列化:使用System.Xml.Serialization命名空间
  ● 对象序列化:使用XmlSerializer走完最后一步