【发布时间】:2012-10-29 19:53:55
【问题描述】:
我有一个可序列化的类,我想用它的数据(当然)和它的 XmlDoc cmets 序列化它。有谁知道现有的图书馆可以完成这项工作,或者至少是其中的一部分?
以 Intellisense 的方式阅读 C# 代码的 XmlDoc 是一个很好的起点。
因为例子胜于理论,所以我想要下面的(C#)代码
public class ApplicationOptions : ISerializable
{
///<summary>This parameter describes the X property</summary>
public int WindowPositionX;
///<summary>This comment is the same as in the XML-serialized form</summary>
public int WindowPositionY;
}
映射到下面的序列化 XML 表单
<!--This parameter describes the X property-->
<parameter name="WindowPositionX" Value=12 />
<!--This comment is the same as in the XML-serialized form-->
<parameter name="WindowPositionY" Value=13 />
【问题讨论】:
标签: c# xml serialization xml-documentation