Hello,
I have a property in my base class that I need serialized when using the base class.
But in my derived class I do not want it serialized. So I in my base class I made it virtual. Then in my derived class I used the decorator [XmlIgnore], but when I serialize my derived class it still includes the property.
Is there any way around this?
Thanks
base class property
derived class property
I have a property in my base class that I need serialized when using the base class.
But in my derived class I do not want it serialized. So I in my base class I made it virtual. Then in my derived class I used the decorator [XmlIgnore], but when I serialize my derived class it still includes the property.
Is there any way around this?
Thanks
base class property
Code:
public virtual int Intent
{
get { return this._intent; }
set { this._intent = value; }
}
derived class property
Code:
[XmlIgnore]
public override int Intent
{
get {return this._intent;}
set { this._intent = value; }
}