In the code I use for serialization/deserialization is the following:
[XmlElementAttribute(Form=XmlSchemaForm.Unqualified)]
public Decimal valArcBegAngle
{
[return: MarshalAs(UnmanagedType.Currency)]
get {return m_valArcBegAngle;}
[param: MarshalAs(UnmanagedType.Currency)]
set {m_valArcBegAngle = value;}
}
private Decimal m_valArcBegAngle;
What can I do so that, if the value is zero, the output is
<valArcBegAngle>000</valArcBegAngle> instead of
<valArcBegAngle>0</valArcBegAngle>?
Thanks in advance.
DC - 30 Nov 2005 22:54 GMT
use a surrogate.
example:
http://cheeso.members.winisp.net/srcview.aspx?dir=xml-serialization&file=Surrogate.cs

Signature
-Dino
D i n o . C h i e s a AT M i c r o s o f t . c o m
> In the code I use for serialization/deserialization is the following:
>
[quoted text clipped - 13 lines]
>
> Thanks in advance.