仅在反序列化期间跳过xml属性

时间:2014-10-01 09:43:02

标签: c# xml asp.net-4.5

' [序列化]

public class ABC
{
    public ABC()
    {
        this.AttributeList = new List<DEF>();
    }

    [XmlAttribute]
    public string EntityName { get; set; }

    [XmlAttribute]
    public bool IsManual { get; set; }

    public List<DEF> AttributeList { get; set; }
}`

我需要在反序列化过程中跳过一些xml属性。 但它们应该在序列化时可用。

我希望序列化包括AttributeList在内的所有属性。但是在反序列化期间,必须忽略AttributeList。可能吗? (我不能使用[XMLIgnore]。)

0 个答案:

没有答案
相关问题