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

推荐订阅源

S
Security Affairs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Jina AI
Jina AI
P
Palo Alto Networks Blog
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
S
Schneier on Security
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
雷峰网
雷峰网
T
Tenable Blog
人人都是产品经理
人人都是产品经理
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
AWS News Blog
AWS News Blog
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Scott Helme
Scott Helme
SecWiki News
SecWiki News
C
CERT Recently Published Vulnerability Notes
Recorded Future
Recorded Future
I
InfoQ
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
Cloudbric
Cloudbric
C
Check Point Blog
Engineering at Meta
Engineering at Meta
TaoSecurity Blog
TaoSecurity Blog
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
N
News and Events Feed by Topic
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
腾讯CDC
量子位
Application and Cybersecurity Blog
Application and Cybersecurity Blog
K
Kaspersky official blog
Vercel News
Vercel News
F
Full Disclosure
T
Troy Hunt's Blog
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs

博客园 - 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走完最后一步